Broadcast emails in Postmark

Can anyone show me how they’ve configured the API connector to send broadcast emails in Postmark? I have it set up for transactional emails, but I don’t know how to set up the API connector when you need to send out a broadcast email to 100+ users

Anybody?

The exact API setup will be specific to how dynamic your broadcast emails are. If you already have transactional email setup it’s basically just repeating the same JSON structure for every single User and then using the Batch endpoint (max 500 emails per API call) described here: Email API | Postmark Developer Documentation

My API setup is basic because the batch emails are very dynamic and so I define them using a JSON at specific points in the app. The documentation link listed above shows how the JSON should be structured, and then I use the :formatted as text operator to turn the list (of users in your case) into a JSON list.

Some things to watch out for

  • Formatting the JSON in a safe manner to not break the API calls (quotation marks, forward slashes commonly break things)
  • If you are using a Postmark Template, make sure your JSON is in the correct format for the Postmark Template, if they have different fields it will throw an error

*They also have a Bulk endpoint, but I don’t recommend using it

1 Like

Thanks, but I’m having trouble getting the call to initialize in the API connector. I’m following the example here for the batch send (with template): Templates API | Postmark Developer Documentation

And this is what the call looks like in API connector (using the same shared headers that I use for all my other Postmark transactional calls)

2 ideas here

  • Remove that last comma, the one after the curly bracket and before the square bracket. (ChatGPT can be good at troubleshooting JSON, just copy and paste into the ai and tell if you are getting an error)

  • You may have a different Postmark Server for Broadcasts than your Transactional one, so make sure you are making the call to the correct Server

1 Like

Checked both of those things, no luck :frowning:

Could it be a weird bubble formatting issue with the square brackets?

What is the Error Response when you try to initialize the call?

Per the message, the issue is in your Template Model.
Looking closer you do not have the <body> field wrapped in quotations. This is likely the issue. Or there could be another issue with the Template Model not aligning with your Template

This topic was automatically closed after 70 days. New replies are no longer allowed.