

How to Auto-create contacts from emails with Pipedream
Automatically create HubSpot contacts when you receive Gmail emails from people not in your CRM database.
Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.
HubSpot Gmail extension exists as a native integration, but it requires manual setup per user and doesn't create contacts automatically. This guide uses an automation platform for full control. View native option →
Best for
Teams that get frequent emails from prospects and want instant CRM updates without manual data entry.
Not ideal for
High-volume customer service teams processing hundreds of emails per hour due to API rate limits.
Sync type
real-timeUse case type
importReal-World Example
A 12-person B2B SaaS company gets 30-50 prospect emails daily to their info@ address. Before automation, the sales team manually added contacts to HubSpot, missing 40% of leads. Now every new sender becomes a contact within 30 seconds of emailing.
What Will This Cost?
Drag the slider to your expected monthly volume.
Each platform counts differently — Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.





Prices shown for annual billing. Based on published pricing as of April 2026.
Estimated ROI
1000
min saved/mo
$583
labor value/mo
Free
no platform cost
Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.
Implementation
Import this workflow directly into Pipedream
Copy the pre-built Pipedream blueprint and paste it straight into Pipedream. All modules, filters, and field mappings are already configured — you just need to connect your accounts.
Before You Start
Make sure you have everything ready.
Field Mapping
Map these fields between your apps.
| Field | API Name | |
|---|---|---|
| Required | ||
email | ||
7 optional fields▸ show
| First Name | firstname |
| Last Name | lastname |
| Company | company |
| Lead Source | hs_lead_source |
| Original Source | hs_analytics_source |
| Phone Number | phone |
| Website | website |
Step-by-Step Setup
Dashboard > New Workflow
Create new Pipedream workflow
Sign into Pipedream and start a new workflow. You'll build a trigger that watches for Gmail emails, then add steps to check HubSpot and create contacts. The workflow runs in real-time when emails arrive.
- 1Click 'New Workflow'
- 2Select 'Start from scratch'
- 3Name it 'Gmail to HubSpot Contacts'
Triggers > Gmail > New Email Received
Add Gmail trigger
Choose the Gmail 'New Email Received' trigger. This creates a webhook that fires instantly when emails arrive in your inbox. You can filter by specific labels or folders if needed. The trigger captures sender details, subject, and body content.
- 1Click 'Select a trigger'
- 2Search for 'Gmail'
- 3Choose 'New Email Received'
Gmail Auth > Grant Permissions
Connect Gmail account
Authorize Pipedream to access your Gmail account. Grant permissions for reading emails and basic profile information. The connection persists across all your workflows. Test the trigger by sending yourself an email to confirm it fires.
- 1Click 'Connect Gmail'
- 2Select your Google account
- 3Click 'Allow' for all permissions
- 4Click 'Test trigger'
Steps > Add Step > HubSpot > Search Contacts
Add HubSpot search step
Add a HubSpot 'Search Contacts' action to check if the email sender already exists. Configure it to search by email address using the Gmail trigger's 'from' field. This prevents creating duplicate contacts for existing people.
- 1Click '+ Add Step'
- 2Search for 'HubSpot'
- 3Select 'Search Contacts'
- 4Map 'Email' to Gmail sender email
HubSpot Auth > Private App Token
Connect HubSpot account
Link your HubSpot account using either a private app token or OAuth connection. Private app tokens work better for single-account setups. Make sure the token has contacts read and write permissions enabled in your HubSpot settings.
- 1Click 'Connect HubSpot'
- 2Choose 'Private App Token'
- 3Paste your HubSpot token
- 4Click 'Connect'
Steps > Code > Node.js
Add conditional logic step
Insert a Node.js code step to check if HubSpot found any existing contacts. If the search returned results, the workflow should stop. If no contacts exist, continue to create a new one. This prevents duplicate contact creation.
- 1Click '+ Add Step'
- 2Select 'Code'
- 3Choose 'Run Node.js code'
- 4Add conditional logic code
Steps > Code > Node.js
Parse sender information
Add another code step to extract the sender's name and company from their email address and signature. Split the email address to get first/last names, and scan the email body for company mentions or signature lines. Store these in workflow variables.
- 1Click '+ Add Step'
- 2Select 'Code'
- 3Add email parsing logic
- 4Set name and company variables
Steps > HubSpot > Create Contact
Add HubSpot create contact action
Insert a 'Create Contact' action from HubSpot. Map the parsed first name, last name, email address, and company to the corresponding HubSpot contact properties. Set a lead source to track that these came from email automation.
- 1Click '+ Add Step'
- 2Search for 'HubSpot Create Contact'
- 3Map firstName to parsed name
- 4Map email to sender email
- 5Map company to parsed company
Steps > Code > Error Handling
Add error handling
Wrap the contact creation in a try-catch block using a code step. Log any API errors to Pipedream's built-in logging system. Send yourself a Slack or email notification when contact creation fails so you can investigate.
- 1Click '+ Add Step'
- 2Select 'Code'
- 3Add try-catch around HubSpot call
- 4Configure error notifications
Workflow > Test > View Logs
Test the complete workflow
Send a test email from an address not in HubSpot to trigger the workflow. Watch the execution logs to verify each step completes successfully. Check HubSpot to confirm the new contact appears with correct information. Test with an existing contact to verify duplicate prevention works.
- 1Click 'Test Workflow'
- 2Send test email
- 3Monitor execution logs
- 4Check HubSpot for new contact
- 5Verify duplicate prevention
This Node.js code extracts company names from email signatures and domains, handling common formatting variations. Paste it into the company parsing code step.
JavaScript — Code Stepexport default defineComponent({▸ Show code
export default defineComponent({
async run({ steps, $ }) {
const email = steps.trigger.event.from;... expand to see full code
export default defineComponent({
async run({ steps, $ }) {
const email = steps.trigger.event.from;
const body = steps.trigger.event.body || '';
const domain = email.split('@')[1];
// Extract company from signature patterns
const signaturePatterns = [
/(?:at|@)\s+([A-Z][^\n,]+(?:Corp|Inc|LLC|Ltd|Company))/gi,
/([A-Z][^\n,]+(?:Corp|Inc|LLC|Ltd|Company))/gi,
/Company:\s*([^\n]+)/gi
];
let company = null;
for (const pattern of signaturePatterns) {
const match = body.match(pattern);
if (match && match[1]) {
company = match[1].trim();
break;
}
}
// Fallback to domain-based company name
if (!company && domain) {
company = domain.split('.')[0]
.replace(/[^a-zA-Z0-9]/g, ' ')
.replace(/\b\w/g, l => l.toUpperCase());
}
return { company: company || 'Unknown' };
}
});Going live
Production Checklist
Before you turn this on for real, confirm each item.
Troubleshooting
Common errors and how to fix them.
Frequently Asked Questions
Common questions about this workflow.
Analysis
Use Pipedream for this if you want granular control over contact data parsing and need custom logic for duplicate prevention. Pipedream's Node.js code steps let you build sophisticated email signature parsing that extracts company names, phone numbers, and job titles with higher accuracy than no-code platforms. The built-in retry mechanism and error logging make it reliable for business-critical contact creation. Choose Zapier instead if your team doesn't code and you just need basic name/email extraction without custom parsing.
This workflow costs 2 credits per email processed. On Pipedream's $19/month plan with 10,000 credits, you can handle 5,000 emails monthly for $0.0038 per contact. That beats Zapier at $0.10 per task ($500 for the same volume) and Make.com at $0.005 per operation plus platform fees. The math works heavily in Pipedream's favor for email-to-CRM automation.
Make.com offers better visual debugging with its node-based interface, making it easier to trace data transformations when things break. Zapier provides more pre-built Gmail filters and HubSpot field mapping templates out of the box. n8n gives you self-hosted control if data privacy is critical. Power Automate integrates better with Outlook and Office 365. Pipedream still wins because its code flexibility lets you handle edge cases that break other platforms - like parsing international business cards or extracting company data from email footers.
You'll hit Gmail's API rate limits at around 1 billion quota units per day, which translates to roughly 10,000 emails depending on payload size. HubSpot's contact creation API allows 100 requests per 10 seconds, so high-volume senders need batching logic. Email signature parsing breaks on plaintext emails, mobile signatures, and non-English content - build robust fallbacks that default to domain-based company names when extraction fails.
Ideas for what to build next
- →Add lead scoring — Create a follow-up workflow that assigns lead scores based on email content sentiment and company size data from Clearbit or ZoomInfo.
- →Set up email categorization — Use AI to classify incoming emails by intent (demo request, pricing question, support) and route them to appropriate sales team members.
- →Create contact enrichment — Build a secondary workflow that enriches new contacts with social profiles, company data, and industry information from third-party APIs.
Related guides
How to Share Notion Meeting Notes to Slack with Pipedream
~15 min setup
How to Share Notion Meeting Notes to Slack with Power Automate
~15 min setup
How to Share Notion Meeting Notes to Slack with n8n
~20 min setup
How to Send Notion Meeting Notes to Slack with Zapier
~8 min setup
How to Share Notion Meeting Notes to Slack with Make
~12 min setup
How to Create Notion Tasks from Slack with Pipedream
~15 min setup