Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Update HubSpot contacts from Gmail auto-replies using Claude and Slack

On a schedule, it handles email with Claude using Gmail, Slack, HubSpot.

What it does

## Update HubSpot contacts who left their company from Gmail auto-replies with Claude and Slack ### Who is it for Sales reps, recruiters and agencies who email prospects from Gmail and keep them in HubSpot. When someone leaves, their auto-reply often names the person who replaced them, and that lead is lost if nobody reads it. ### How it works 1. Every hour, the workflow searches Gmail for auto-replies and bounces from the last two days. Newsletters and your own emails are ignored. 2. Each sender is looked up in HubSpot. People who are not contacts, or are already marked as gone, are skipped. 3. Permanent bounces go straight to approval. Claude reads the other replies and says whether the person left, is out of office or neither, with the exact words. 4. Plan HubSpot Changes is plain code. It only uses quotes, addresses and dates found word for word in the reply, and never adds a shared inbox such as sales@ as a contact. 5. For leavers and bounces, Slack shows the reply and the planned change. Only after you press Approve does the lead status change, the reply get saved as a note, and the named replacement get added at the same company with the same owner. No answer within 24 hours means no change. 6. Out-of-office replies get a HubSpot follow-up task for the working day after the person is back. ### How to set up - [ ] In HubSpot, open Development, Legacy apps, Create legacy app, Private. Add the scopes crm.objects.contacts.read, crm.objects.contacts.write, crm.objects.companies.read and crm.objects.companies.write, create the app and copy the access token from its Auth tab. - [ ] In Test HubSpot Connection, create a HubSpot App Token credential with that token. Pick the same credential in Get HubSpot Account, Find Contact in HubSpot and Write to HubSpot. - [ ] Connect Gmail, Slack and Anthropic. - [ ] Fill in Config with your Slack channel ID (at the bottom of the channel details), then publish. ### Requirements HubSpot (the free CRM works; creating the app needs super admin rights), Gmail, Slack and an Anthropic API key. Hourly runs use about 720 executions a month. ### How to customize the workflow In Config, set leftLeadStatus to another lead status value, change lookBackDays, followUpDaysAfterReturn or approvalWaitHours, or set postOutOfOffice to false to add follow-up tasks without a Slack message. Swap the Claude model for any chat model.

The steps

  1. Every Hour
  2. Config
  3. Check Your Settings
  4. Test HubSpot Connection
  5. Get HubSpot Account
  6. Confirm HubSpot Access
  7. Search Gmail for Auto-Replies
  8. Skip Replies Already Seen
  9. Sort Replies and Bounces
  10. Find Contact in HubSpot
  11. Read Contact Match
  12. Route by Reply Kind
  13. Read Reply With Claude
  14. Claude Model

25 steps in total.

Similar automations