ZapierChecked blueprint4 nodes
Copy Intercom leads into HubSpot with a company guess
When Intercom captures a lead email, work out the company from the domain and create the HubSpot contact with company and website filled in.
Portfolio reference build with demo data and placeholder credentials, not a client deployment.
Pain
Stops reps from manually copying web forms, guessing lead quality, and researching prospects before calling. Bad fits get filtered; hot buyers land with a full brief.
Solution
When Intercom captures a lead email, work out the company from the domain and create the HubSpot contact with company and website filled in.
Impact · From the blueprint
About 2 minutes per chat lead, and chat leads stop being invisible to marketing.
- Intermediate
- Validated
- Auto path
- Intercom
- Code by Zapier
- HubSpot
- Slack
Library status: passing. Schema, field mapping, task count, and Code-step unit tests pass. Not built in a live Zapier account.

Step inspector
The first step shows the checked-in sample payload.Later steps name the node. They are not a live execution.
Guardrails
No approval, retry, or demo-gate node was detected by name. Read the README before connecting live credentials.
Credential ids in the JSON are placeholders. These files are portfolio demos.
Deploy this for your business
Tell us this slug and what still happens by hand. We will map it onto your accounts. This page is not a claim that the blueprint already runs for a customer.
README
Portfolio demo by Mustafa (mustafaautomation). Not client work. The people, companies, and numbers in it are made up. Rebuild it in your own Zapier account. Nothing here is connected to anyone's account.
Category: Lead gen and CRM
Difficulty: intermediate
Apps: Intercom, Code by Zapier, HubSpot, Slack
Zapier plan: Professional (multi-step Zap: 3 steps after the trigger)
Tasks per run: 3
Test status: passing (schema, mapping scope, task count, Code step unit tests)
Problem
Intercom collects emails from the chat widget, but those leads never reach HubSpot, so marketing cannot follow up and sales does not know who is chatting.
Who it's for
SaaS and service teams using Intercom chat on the website and HubSpot as the system of record.
How the Zap runs
flowchart TD s1["1. Intercom: New Lead<br/>New Intercom lead"] s2["2. Code by Zapier<br/>Guess the company from the email"] s1 --> s2 s3["3. HubSpot<br/>Create the contact with company fields"] s2 --> s3 s4["4. Slack<br/>Post the lead to the team"] s3 --> s4
Build it in the Zapier editor
Zapier has no import file for a Zap like this one, so it is built by hand from the steps below. zap.json is the same Zap in a machine-readable form (schema), and zap.yaml is the same document in YAML.
A value like [2. vendor] means: click the field, open step 2 in the data picker, and choose vendor. Plain text is typed as shown. YOUR_... is a value from your own account.
Steps
1. Trigger: New Intercom lead
App: Intercom · Event: New Lead · polling (Zapier checks on your plan's update interval) · Tasks: 0
Fires when Intercom creates a lead, which happens when an anonymous visitor leaves an email in the chat.
Fields this library maps from the trigger: lead_id, name, email, phone, created_at, last_seen_url, city, country. Zapier shows them with its own labels; pick the one with the same meaning.
2. Action: Guess the company from the email
App: Code by Zapier · Event: Run JavaScript · Tasks: 1
Most chat leads leave only an email. A work domain gives HubSpot a company name and website; a free mailbox gives nothing, and the step says so.
Paste the whole of code/email-domain.js into the code box. Source: content/code/email-domain.cjs. Unit tests: content/code/email-domain.test.cjs.
| Input Data key | Value |
|---|---|
email | [1. email] |
Returns: valid, domain, is_free_provider, is_role_address, company_guess, website.
3. Action: Create the contact with company fields
App: HubSpot · Event: Create or Update Contact · Tasks: 1
HubSpot associates the contact with a company by domain when automatic association is on, which is why the website matters.
| Field | Value |
|---|---|
| [1. email] | |
| First Name | [1. name] |
| Phone Number | [1. phone] |
| Company Name | [2. company_guess] |
| Website | [2. website] |
| City | [1. city] |
| Country/Region | [1. country] |
| Lifecycle Stage | lead |
| Chat page (custom property) | [1. last_seen_url] |
Later steps can map: id, is_new, profile_url.
4. Action: Post the lead to the team
App: Slack · Event: Send Channel Message · Tasks: 1
Shows which page they chatted from and whether the email looks like a business.
| Field | Value |
|---|---|
| Channel | #chat-leads |
| Message Text | Chat lead [1. email] (company guess: [2. company_guess], free mailbox: [2. is_free_provider]) from [1. last_seen_url]. [3. profile_url] |
| Send as a bot? | Yes |
| Bot Name | Zap alerts |
| Include a link to this Zap? | No |
Later steps can map: ts, permalink.
Test it
Use sample-trigger.json as the test record. For an instant or webhook trigger, send it to the trigger once; for a polling trigger, create a matching record in the app and click Test trigger. Then test each step in order and read its output before you turn the Zap on.
{
"lead_id": "6743d1e9f0a1b2c3d4e5f600",
"name": "Felix",
"email": "felix@harbor-goods.example",
"phone": "",
"created_at": "2026-11-24T13:47:05Z",
"last_seen_url": "https://www.example.com/pricing",
"city": "Portland",
"country": "United States"
}
Plan and task usage
| Step | App | Tasks |
|---|---|---|
| 1. New Intercom lead | Intercom | 0 |
| 2. Guess the company from the email | Code by Zapier | 1 |
| 3. Create the contact with company fields | HubSpot | 1 |
| 4. Post the lead to the team | Slack | 1 |
A typical run uses 3 tasks. Zapier does not charge tasks for triggers, Filter, Paths, Formatter, Delay, Looping, Digest, Storage, or Zapier Tables steps. AI by Zapier is counted here as 1 task; Zapier prices it by model tier, so a larger model can cost more.
Minimum plan: Professional, because of: multi-step Zap: 3 steps after the trigger. The Free plan only runs two-step Zaps (a trigger and one action) and leaves out Filters, Paths, Formatter, webhooks, AI by Zapier, and premium apps.
Customize
- Add a Filter on
[2. is_free_provider]before Slack if only business emails are worth announcing. - Feed the domain into an enrichment step such as Apollo Enrich Organization for size and industry.
Limits
- The company guess comes from the domain spelling ("harbor-goods" becomes "Harbor Goods"). It is a starting point, not verified data.
Time saved
About 2 minutes per chat lead, and chat leads stop being invisible to marketing.
Files
| File | What it is |
|---|---|
zap.json | The Zap, step by step, in schema 1.0.0. |
zap.yaml | The same document in YAML. |
sample-trigger.json | Fictional trigger record for the first test. |
diagram.png | The step list, drawn like the Zapier editor. |
code/email-domain.js | Paste-ready Code by Zapier step. |