Send an email with Mailchimp or Mandrill
Send a transactional email from a care flow through Mailchimp's Mandrill API, using a REST API call action.
Mailchimp sends transactional email through Mandrill. Where an organization already uses Mailchimp, a care flow can send through that API rather than through Awell's built-in email action.
For plain templated email without a third-party account, use Send email notifications instead. Take this route only when Mailchimp's templates or deliverability are the reason.
Set up Mailchimp first
Follow Mailchimp's own Transactional API quick start to get:
- an API key for the Transactional API
- a verified domain to send from
Send a test email from Mailchimp before wiring anything into a care flow. If it doesn't work there, it won't work from Awell either, and it's harder to debug from inside a care flow.
Configure the API call action
Use a REST API call action.
Endpoint, one of:
POST https://mandrillapp.com/api/1.0/messages/send
POST https://mandrillapp.com/api/1.0/messages/send-templateUse send-template when the content lives in a Mailchimp template, and send when the care flow
supplies the body.
Headers:
Content-Type: application/jsonBody. Mandrill expects the API key inside the JSON body rather than in a header:
{
"key": "",
"message": {
"from_email": "",
"to": [{ "email": "" }],
"subject": "",
"html": ""
}
}Fill the values with variables so each email goes to the right patient, and keep the API key in a constant.
Next steps
Storing the response in a data point lets the care flow react to a send failure rather than assuming it worked. See The API call action.
Set up a GraphQL API call to Healthie
Configure a GraphQL API call action against Healthie, including which environment to point at and how to handle authentication.
Automate with events
React to what happens inside a care flow, and let other systems start one: outbound webhooks, incoming webhooks, and every way a care flow can be triggered.