Sync new Intercom leads and users straight into HubSpot

By General Input

The moment someone signs up in Intercom, their profile lands in HubSpot with lead source and lifecycle stage set, and your sales channel hears about it.

Integrations

  • Intercom
  • HubSpot
  • Slack

Type

Deterministic Code

Categories

  • Sales
  • Operations

Whenever a new contact is created in Intercom, mirror that person into HubSpot so the sales team is never working from a stale list. Trigger this workflow from an Intercom webhook and subscribe to both contact creation topics, contact.lead.created and contact.user.created, so it fires both for leads captured while browsing and for people who complete signup. Each run handles one contact.

Take the contact ID from the webhook payload and call Get a Contact in Intercom to read the full profile rather than trusting the webhook body alone. Pull the email address, first and last name, phone, the associated company name, and the custom attributes we set at signup. Also read the role field, which is how Intercom distinguishes a lead from a signed-up user now that both live in the same contacts model, and carry that through so the two can be treated differently later if needed.

Before writing anything, apply the skip rules. If the contact has no email address, stop and do nothing. If the email is on an internal or test domain, stop as well. Keep the blocked domain list as a single editable constant near the top of the workflow so it is easy to extend, and seed it with the workspace owner's own company domain plus common test domains such as example.com and mailinator.com. Skipped contacts produce no HubSpot write and no Slack message.

Next, run Search Contacts in HubSpot with a filter on the email property equal to the contact's email address, to find out whether this person already exists. HubSpot has no dedicated search-contacts-by-email operation, so use the general Search Contacts operation with an email filter rather than looking for a more specific one. Treat a non-empty result as a hit and hold on to it, because that is what decides the wording of the Slack message at the end.

Then call Batch Upsert Contacts in HubSpot with a single contact in the batch, matched on the email property so that re-running the workflow can never create a duplicate. Map first name, last name, phone and company from Intercom onto the corresponding HubSpot contact properties, and map the signup custom attributes onto the HubSpot properties that match them. Stamp a lifecycle stage on every record, and set a lead source property to Intercom so attribution survives downstream reporting. When the search returned a hit this updates the existing record; when it did not, it creates a new one. Only write the fields being mapped, and leave every other HubSpot field untouched rather than blanking it.

Finally, post one line to the sales channel using Send a Message in Slack. Name the contact, name their company, and state plainly whether the record was created or updated, for example "New HubSpot contact created: Dana Reed (Northwind Trading), source Intercom" or "HubSpot contact updated: Dana Reed (Northwind Trading), source Intercom". Keep it to a single line so the channel stays readable, and include a link to the HubSpot record when the record identifier comes back from the upsert. Fall back to a sensible placeholder such as "no company" when Intercom has no company on the profile.

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