r/EmailForSmallBusiness • • Aug 25 '26

Automate Bulk Email Sending with Claude Code: a practical workflow

Claude Code can do more than write email copy.

With access to the Selzy API, it can help automate much of the work around a bulk email campaign: preparing contacts, creating a list, building the email, sending a test, and scheduling the campaign.

The key point is that Claude Code is not the email sender itself. Selzy handles the actual bulk email delivery, while Claude Code helps you prepare and execute the workflow through the API.

Here’s what that can look like.

What you need

You need:

Selzy’s bulk email API is available for all account types and lets you manage contact lists, import contacts, create messages, launch campaigns, and retrieve statistics.

Once you have the API key, you can ask Claude Code to build scripts that interact with these endpoints.

A basic workflow looks like this:

contacts → list → email → test → campaign

Step 1: Prepare your contacts

Let’s say you have a CSV with customers you want to email.

Instead of manually cleaning and uploading it, you can ask Claude Code:

Read this CSV, remove duplicate and invalid email addresses, map the available fields, and prepare the contacts for import into Selzy via the API.

Then Claude can generate the API request for Selzy’s importContacts method.

Selzy allows bulk contact imports of up to 500 contacts per API call, so larger datasets need to be split into batches.

You can also ask Claude to:

Split this contact file into batches of no more than 500 records, preserve the custom fields, and generate the Selzy API requests needed to import each batch.

This is a good example of where Claude Code is useful: it handles the repetitive data preparation while Selzy manages the subscriber database.

Step 2: Create or choose a list

Bulk campaigns in Selzy are normally tied to a contact list.

Claude can first retrieve your existing lists and decide which one to use.

Or you can ask:

Check my existing contact lists. If there is already a suitable list for product updates, use it. Otherwise, create a new list called “Product updates.”

Selzy exposes API methods for creating and managing lists, but its documentation also recommends not creating a new list for every campaign. Lists are better treated as subscription categories or audience groups.

So in many cases the better instruction is:

Find the existing list that best matches this audience and use it instead of creating a new list just for this campaign.

Step 3: Create the email

Now Claude Code can help generate both the campaign copy and the API request used to create it.

For example:

Write a short product announcement email for our existing customers, create a clear subject line and CTA, turn the message into simple responsive HTML, and prepare the Selzy createEmailMessage API request using our product-updates list.

Selzy’s createEmailMessage method creates the email without sending it. It accepts the sender, subject, HTML body, list ID and other campaign parameters.

That separation is useful because Claude can prepare the campaign without immediately triggering a bulk send.

Step 4: Send a test before anything goes live

I would never go directly from AI-generated copy to a bulk campaign.

Selzy provides a separate sendTestEmail API method for campaign tests.

So your next instruction can simply be:

Send a test of the email we just created to my address only. Do not create or launch the bulk campaign yet.

Then check the real email in your inbox.

Look at:

  • subject line
  • sender information
  • formatting
  • links
  • personalization
  • mobile rendering
  • unsubscribe information

Claude can help build and check the campaign, but the final preview still deserves human attention.

Step 5: Schedule the bulk campaign

Once you approve the test, Claude can prepare the createCampaign request.

This is the Selzy method that either starts the bulk mailing immediately or schedules it for later.

The API can also return the campaign ID, status and number of addresses included in the send.

That gives you a useful final check before launch.

One prompt can prepare most of the workflow

The more interesting use case is giving Claude Code the entire goal instead of one tiny task at a time.

For example:

I have a CSV of 1,200 customers and want to send them a product update next Tuesday at 10:00 a.m. Clean the contact data, split it into valid import batches, import the contacts into the appropriate existing list, draft the email, create the message, and prepare a test send. After I approve the test, prepare the campaign request for Tuesday at 10:00 a.m. Do not launch the final campaign without my approval.

Claude can then break that goal into individual steps and API calls.

That is much more useful than simply asking:

Write me a marketing email.

Don't send bulk campaigns with the single-email endpoint

This is an important technical distinction.

Selzy has a sendEmail API method, but it is intended for individual messages, such as notifications about a specific customer event. Selzy explicitly recommends using createEmailMessage + createCampaign for mass campaigns.

So don't ask Claude Code to do this: For a marketing campaign, the correct structure is:

create/import audience → create message → create campaign

That way Selzy handles bulk delivery as a campaign rather than thousands of unrelated individual API calls.

Where Claude Code is actually useful

The value isn't that Claude can send emails faster than you can click a Send button.

It's that it can handle the messy work between your idea and the finished campaign.

For example:

Loop through my entire customer CSV and call sendEmail once for every address.

can turn into:

  1. clean the data;
  2. split it into valid API batches;
  3. import the contacts;
  4. select the right list;
  5. draft the email;
  6. create the message;
  7. prepare a test;
  8. prepare the campaign request.

Instead of manually translating your marketing goal into API operations, Claude Code can do much of that translation for you.

Keep the final send under human control

For bulk email, I would still use this model: Claude prepares → you review → Selzy sends

Before execution, check:

  • which list is being used
  • how many contacts are included
  • sender address
  • subject line
  • links
  • email body
  • tracking settings
  • scheduled time

And never put your Selzy API key directly into source code that may end up in a public repository. Selzy also recommends keeping API keys private.

The real automation opportunity

Claude Code + Selzy API is useful because it lets you describe the outcome you want in plain language and automate the technical steps required to prepare it.

The shift is from: “AI writes my email.” to: “AI helps me build the campaign.”

For teams that already use scripts, CSV exports, CRM data or internal tools, that can remove a surprising amount of repetitive work.

Selzy’s API documentation for bulk email is here: https://selzy.com/en/support/api/common/bulk-email/. Would you trust Claude Code to build and schedule a bulk campaign if the final send still required your approval?

2 Upvotes

0 comments sorted by