Process Shopify lead emails from Gmail to HubSpot contacts and deals
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.
What 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
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).
| 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…