# Receive a notification on Slack for failed transactional emails

**URL:** <https://community.parabola.io/t/receive-a-notification-on-slack-for-failed-transactional-emails/1355>\
**Category:** Show and Tell\
**Created:** [December 8, 2020, 3:44pm UTC](https://community.parabola.io/t/receive-a-notification-on-slack-for-failed-transactional-emails/1355 "2020-12-08T15:44:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agathe\_Brusset](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/agathe_brusset/32/1033_2.png) [@Agathe\_Brusset](https://community.parabola.io/u/Agathe_Brusset)\
**Post date:** [December 8, 2020, 3:44pm UTC](https://community.parabola.io/t/receive-a-notification-on-slack-for-failed-transactional-emails/1355/1 "2020-12-08T15:44:43Z")

</div>

Hello to the Parabola community 👋

_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](https://www.mailersend.com), 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](https://developers.mailersend.com/api/v1/activity.html#get-a-list-activities):  
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:

 ![Capture d’écran 2020-12-08 à 16.16.39](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/3/38bb5a508a98697afd51e9058a4a6454f3811d10.png)

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.

 ![Capture d’écran 2020-12-08 à 16.17.48](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/9/98d38633a0b35714d48269b4f2df80e18e1f59dd.png)

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

- The API endpoint URL should be found in your [Slack API dashboard](https://api.slack.com/apps/), under “Add features and functionality” \> “Incoming webhooks”.

 ![Capture d’écran 2020-12-08 à 16.22.10](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/6/6e48518cb407a7439c4e7c5eacbbc4da4752f353.png)

- Copy the webhook URL that should start with “[https://hooks.slack.com/services/](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." }`

 ![Capture d’écran 2020-12-08 à 16.24.27](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/d/d087555a2162038c12489baf514f8ad96504e024.png)

You should have something like this:

 ![Capture d’écran 2020-12-08 à 16.27.51](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/6/68f4ac00bd4939186a1d5593c1f488725b643f61.png)

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](https://www.mailerlite.com) so I don’t harm my bounce rate.
- Create an action required ticket in [Helpscout](http://helpscout.com) 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.

---

<div class="post-metadata">

**Author:** ![jp](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/jp/32/20_2.png) [@jp](https://community.parabola.io/u/jp)\
**Post date:** [December 8, 2020, 5:17pm UTC](https://community.parabola.io/t/receive-a-notification-on-slack-for-failed-transactional-emails/1355/2 "2020-12-08T17:17:26Z")

</div>

This is super cool, Agathe! Thanks for sharing!
