Process Shopify lead emails from Gmail to HubSpot contacts and deals
Needs changesWhat this workflow does
This workflow has 8 nodes and runs on Gmail events. Along the way it connects Gmail and HubSpot.
How it runs
Trigger: On Gmail events.
- Get a message (Gmail): get
- Extract From Email (Function): runs custom JavaScript (legacy Function node)
- If: checks a condition and branches into true / false
- Code: runs custom JavaScript code
- Edit Fields (Edit Fields (Set)): sets 7 fields: name, email, city…
- Create or update a contact (HubSpot): uses HubSpot
- Create a deal (HubSpot): work with deal
Services it uses
Other HubSpot + Gmail templates (102)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Function (legacy) in Extract From Email: replace with Code node, mode 'Run Once for All Items'.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Extract From Email | Code node, mode 'Run Once for All Items' |
Nodes used (7)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Function
n8n-nodes-base.function - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - HubSpot
n8n-nodes-base.hubspot
From the author
📌 Overview This workflow automatically processes incoming Shopify/Gmail leads and pushes them into HubSpot as both Contacts and Deals. It helps sales and marketing teams capture leads instantly, enrich CRM data, and avoid missed opportunities. --- ⚡ How it…