Log Postmark bounces to HubSpot and alert deal owners in Slack

By General Input

When an email hard-bounces or gets flagged as spam, the bounce gets logged on the matching HubSpot contact, a 3-day task lands with the deal owner, and your CRM hygiene channel gets a one-line ping.

Integrations

  • Postmark
  • HubSpot
  • Slack

Type

Agentic Task

Categories

  • Sales
  • Operations

Build me an agent workflow that turns Postmark email bounces into clean records inside HubSpot, so my sales team never loses a contact to a silent bounce.

Trigger: an incoming webhook from Postmark. I will configure the workflow's webhook URL as the Bounce and Spam Complaint webhook on the relevant Postmark message stream. Postmark will POST a JSON payload that includes Type, TypeCode, Email, Description, Details, Tag, BouncedAt, and MessageStream.

Step 1. Look at the bounce Type. Only continue for HardBounce and SpamComplaint. For SoftBounce, Transient, AutoResponder, Unsubscribe, or anything else, exit silently. The CRM hygiene channel should not get noisy with transient failures.

Step 2. Look up the HubSpot contact whose email matches the bounced Email using HubSpot Get Contact with idProperty=email. Request the firstname, lastname, email, and hubspot_owner_id properties. If no matching contact is found, exit silently.

Step 3. If the contact has an owner, call HubSpot Get Owner with that owner id so you have the owner's first name and email for the Slack message and task assignment.

Step 4. Translate the Postmark bounce into a one-line plain-English reason a salesperson can understand. Examples: a HardBounce whose Description mentions 'mailbox does not exist' or 'user unknown' becomes 'Mailbox does not exist'. A HardBounce with policy or block language becomes 'Blocked by recipient mail server'. A SpamComplaint becomes 'Recipient marked our email as spam'. If nothing else fits, fall back to the Postmark Description field verbatim.

Step 5. Use HubSpot Create Note to attach a note to the contact, associated via the contact-to-note association. The note body should include the bounce reason, the bounced address, the original Postmark Tag (so the salesperson knows which campaign or template caused it), the message stream, and the BouncedAt time in the team's local format.

Step 6. For HardBounce only, also call HubSpot Create Task to create a task associated with the contact and assigned to the contact's owner (hubspot_owner_id). Title it 'Update email address for {firstname} {lastname}'. Set the due date to 3 business days from now. Set priority to MEDIUM. Skip this task creation for SpamComplaint, because a complaint usually means the contact does not want to be emailed at all.

Step 7. Send one Slack message using Slack Send a Message to the channel #crm-hygiene. Keep it to a single line. For a hard bounce: 'Hard bounce for {Contact Name} (owner: {Owner First Name}): {bounce reason}.' For a spam complaint: 'Spam complaint from {Contact Name}, owner {Owner First Name}. Please review.' If there is no owner on the contact, omit the owner segment instead of writing 'unassigned'.

Keep the Slack message to a single line. No threads, no attachments, no @here, no Block Kit. Channel hygiene is the whole point of this workflow.

If any HubSpot call fails (rate limit, transient 5xx), retry once after a short backoff. If the Slack post fails, still consider the run successful as long as the HubSpot note was written, because the note is the source of truth and the Slack message is just a heads-up.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe reveals