Qualify & route leads across channels with GPT-4o, Slack & CRM integration
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, HubSpot, Salesforce and Slack and 2 more.
How it runs
Trigger: On Gmail events (plus 1 other trigger).
- Merge: merges the data from its input branches
- Workflow Configuration (Edit Fields (Set)): sets 8 fields: targetIndustries, minCompanySize, buyerRoles…
- Validate Input Data (Code): runs custom JavaScript code
- Check Validation (If): checks a condition and branches into true / false
- Extract Lead Data with AI (OpenAI): uses OpenAI
- Log Validation Failure (Edit Fields (Set)): sets 4 fields: status, timestamp, errorMessage…
- Parse AI Response (Code): runs custom JavaScript code
- Log Failed Leads (Google Sheets): append or update
- Calculate Lead Score (Code): runs custom JavaScript code
- Route by Territory (Switch): routes items into 2 branches
…plus 4 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Email Trigger).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Webhook
n8n-nodes-base.webhook - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch - HubSpot
n8n-nodes-base.hubspot - Salesforce
n8n-nodes-base.salesforce - Slack
n8n-nodes-base.slack - Google Sheets
n8n-nodes-base.googleSheets - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
This n8n template demonstrates how to use AI to capture, qualify, and route inbound leads automatically from email or web forms. It extracts key business information using AI, scores the lead based on your ideal customer profile, creates CRM records, notifies…