Receive a notification on Slack for failed transactional emails

Hello to the Parabola community :wave:

TL;DR: send a notification on a dedicated Slack channel on each failed transactional email with only 3 blocks: “Pull from API”, “Filter rows”, “Send to an API”.

I am Agathe, from France, and I work as a project manager at MailerSend, a cloud-based transactional email system built for developers, but designed so your entire team can use it.

You probably know what a transactional email is. Actually, with Christmas approaching, your inbox might be full of them! Look for the emails verifying your accounts, confirming your orders or resetting your password. Those are transactional emails. At MailerSend, we connect your infrastructure and send on-time transactional emails to your customers.

Sometimes, emails can get lost: either the recipient’s email address is incorrect, or the inbox is full, or has been thrown out in the spam section… It can happen, and some of our users wanted to know when that happens and take action so their service level isn’t impacted.

So, in order to know that, we have an analytics dashboard on our app, but not yet the ability to send a notification when an email fails. That’s what I built using Parabola!

The idea is that for each email with a hard_bounced, soft_bounced, spam_complaint, junk, we receive a notification on a dedicated Slack channel.

What we need:

  • A MailerSend account, with a verified domain name.
  • A Slack account with a Slack app.
  • A Parabola account.

How to build that flow?
1/ Take a “Pull from an API” block and GET domain activity:
For that, we use the GET request :

  • https://api.mailersend.com/v1/activity/{domain_id} The domain_id can be found on the URL of your domain page.
  • Bearer token has to be generated on the Domain page, by clicking “Generate new token”.
  • Select “Data” as the Top Level Key.

You should have all your domain activity, like this:

2/ Take a “Filter rows” block:
And select the wanted filters, in this case, let’s keep rows where type is hard_bounced, soft_bounced, spam_complaint or junk.

3/ Take a “Send to an API” block and POST:

  • The API endpoint URL should be found in your Slack API dashboard, under “Add features and functionality” > “Incoming webhooks”.

  • Copy the webhook URL that should start with “https://hooks.slack.com/services/” into your Parabola POST request.
  • Add your request body and add the variables you’d like to be displayed in your channel, like:

{"text":"An email created at {created_at} has been {type} at {updated_at}. Please take action." }

You should have something like this:

Save and run the flow!

Room for Improvement
It may be a small contribution, but there are many ways to use Parabola and MailerSend to automate your flow. Examples include, but are not limited to:

  • Attach all of my customer’s MailerSend email activity to their contact record in HubSpot CRM, with the “Send to Hubspot” block.
  • Unsubscribe hard bounced email from my subscriber list in Mailerlite so I don’t harm my bounce rate.
  • Create an action required ticket in Helpscout when an email has hard bounced.

If anybody has suggestions for ways I can improve this flow, please let me know!
Please don’t hesitate to reply to this thread or reach out to me directly if you have any questions.

Always happy to help!
Agathe.

This is super cool, Agathe! Thanks for sharing!

4 Likes