Suppress email unsubscribes and spam complaints everywhere
When someone unsubscribes, reports spam, or gets blocked, we opt them out in your CRM, stop future campaigns, and log it for compliance.
When Mailjet reports that someone unsubscribed, marked an email as spam, or was blocked, suppress that person everywhere so we never email them again. Trigger this workflow from a webhook that receives Mailjet's Event API. Mailjet pushes open, click, bounce, blocked, spam, unsub and sent events to the same endpoint, so the first thing the workflow does is check the event type and only continue for unsub, spam and blocked. Any other event type should end the run quietly without raising an error.
Mailjet may post a single event object or, when event grouping is enabled, an array of events in one request. Handle both shapes and process each qualifying event independently. From each event take the recipient email address, the event type, the campaign identifier and the event timestamp. Blocked events also carry an error reason, so capture that when it is present.
Look up the person in HubSpot with Search Contacts, filtering on the email property for an exact match on the address from the event. If a contact comes back, use Update Contact with that contact's ID to set the opt-out and marketing status fields so the record is flagged as unsubscribed and no longer marketable. Use whichever opt-out and marketing contact status properties the portal has configured, and also record the suppression reason and date if properties exist for them.
Mark the same person as suppressed in Mailjet with Update a contact, setting IsExcludedFromCampaigns to true. A Mailjet contact can be addressed by email address directly, so the event payload is enough to make this call without a separate lookup.
Append a row to a Google Sheets suppression audit log with Append Values. Each row should capture the email address, the event type, the campaign and the timestamp, plus whether a HubSpot contact was found and updated. This sheet is the durable record of who was suppressed and why.
Post a short Slack notice with Send a Message only for spam complaints. Spam complaints hurt sender reputation and deserve a human look, while routine unsubscribes and blocked addresses do not need to interrupt anyone. The message should name the email address, the campaign and the time of the complaint.
If no HubSpot contact matches the address, still write the audit row and still exclude the contact in Mailjet, then finish successfully. Transactional recipients often have no CRM record, so a missing contact is a normal outcome rather than a failure. Note the missing match in the audit row so the gap stays visible.
What does this prompt do?
- Listens for unsubscribes, spam complaints, and blocked addresses from your email platform the moment they happen
- Finds the matching person in your CRM and marks them as opted out and no longer marketable
- Excludes them from future email campaigns so the same address is never mailed again
- Keeps a running audit log in a spreadsheet with the address, what happened, which campaign, and when
- Pings your team in chat for spam complaints only, so routine unsubscribes stay quiet
What do I need to use this?
- A Mailjet account with sending activity
- A HubSpot login with permission to view and edit contacts
- A Google account with a spreadsheet to use as the suppression audit log
- A Slack workspace and a channel for spam complaint alerts
How can I customize it?
- Choose which events cause suppression, for example unsubscribes only, or unsubscribes plus spam complaints and blocked addresses
- Pick the channel that receives spam complaint alerts, or turn the alerts off entirely
- Change which contact fields get updated in your CRM, and add your own suppression reason or date field
- Decide which columns the audit log captures and point it at a different spreadsheet or tab
FAQs
What happens if the person is not in my CRM?
Does this cover spam complaints as well as unsubscribes?
Will my team get pinged every time someone unsubscribes?
How quickly does someone get suppressed?
Why keep a separate spreadsheet log if the CRM is already updated?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.
Never email an unsubscribed person again.
Suppress opt-outs and spam complaints across your CRM, your email platform, and your audit log the moment they happen.