A recent question in the Mautic community on Facebook asked how to get unsubscribe notifications in Mautic.
In this post, I’ll walk you through the process of having an email sent to you when someone unsubscribes using the Mautic unsubscribe link.
Step 1 – Create a Segment
Navigate to the Segments section and click on “+ New” in the upper-right corner. Give your segment a meaningful name and description so you can easily identify it’s purpose in the future. In the example here, I’ve used “Unsub Notice”:
Next, create a filter by clicking on the “Filters”, and selecting “Unsubscribed – Email”, “equals”, “Yes”:
Finally, click “Save & Close” to create your segment. Note that the next time your segment update cron job runs, it will populate the segment with everyone who has unsubscribed.
Step 2 – Create an email
In the left-hand menu, click on “Channels” then “Emails”. Click “+ New” and select “New Template Email” to start building the the email. Fill out the Subject and Internal Name, select your email theme, and go to the email builder.
Note: the email doesn’t have to look fancy – you’re the only one who will receive it. If you’d like a free theme suitable for this email, I can recommend our Simple Transactional Email theme.
The exact wording is up to you, but you can see what I have here:
You can use any of the available tokens, I just used the basics because that’s all I need.
Click on “Close Builder”, then “Save & Close” and you’re ready for the final step.
Step 3 – Create a campaign to send unsubscribe notifications
The final step is to create the campaign. In the left-hand menu, click “Campaigns” and click on “+ New” in the upper-right corner. As with the segment, give the campaign a meaningful name and description so you can easily identify it’s purpose in the future. I’ve used “Unsub Notice” again so I can easily see the segment and campaign are linked:
Note that I have selected to allow contacts to restart the campaign. This is deliberate so that if a contact re-subscribes, then unsubscribes again, I get another unsubscribe notification.
Now click on “Launch Campaign Builder” and set the contact source to the segment you created in step 1. Next, add an action of “Send email to user” and fill out the form, selecting the email you created in step 2:
Click “Add” and then add another action below that to remove the contact from the segment. This is optional but by doing so, you allow contacts to restart the campaign by being added to the segment again.
Your campaign should look like this:
Getting your unsubscribe notifications
Now any time someone unsubscribes, you’ll receive an email telling you that they’ve unsubscribed. The first time the campaign runs, if you have a number of contacts already unsubscribed you may get a lot of emails. Every time it runs after that you will only receive new unsubscribe notifications.