# 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.

- Workflow type: code
- Services: Mailjet, HubSpot, Google Sheets, Slack
- Categories: Operations, Marketing
- Published: 2026-08-07

## What it does

- 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 you'll need

- 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

## Prompt

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.

## How to customize

- 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

## FAQ

### What happens if the person is not in my CRM?

The run still succeeds. People who only ever received transactional email often have no CRM record, so the workflow writes the audit row and excludes them from future campaigns, then notes in the log that no contact matched. It does not treat a missing record as an error.

### Does this cover spam complaints as well as unsubscribes?

Yes. It handles unsubscribes, spam complaints, and blocked addresses. All three suppress the person, but only spam complaints send a chat notification, since those are the ones that damage your sending reputation.

### Will my team get pinged every time someone unsubscribes?

No. Routine unsubscribes and blocked addresses are handled silently and recorded in the audit log. Only spam complaints post a message, and you can change or remove that behavior.

### How quickly does someone get suppressed?

Within seconds. Your email platform pushes the event as it happens rather than waiting for a scheduled sync, so the CRM and campaign exclusion are updated almost immediately.

### Why keep a separate spreadsheet log if the CRM is already updated?

The spreadsheet is a durable, exportable record of who was suppressed and why, including people who were never in the CRM. It is useful for compliance questions and for spotting a campaign that is generating unusual complaint volume.

Use this prompt in General Input: https://www.generalinput.com/prompts/suppress-email-unsubscribes-and-spam-complaints-everywhere