Capture and enrich leads with GPT-4o, Postgres, Slack, Gmail and your CRM
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model, Postgres, Gmail and Slack and 1 more.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Workflow Configuration (Edit Fields (Set)): sets 3 fields: crmApiUrl, slackChannel, salesReps
- Validate Required Fields (If): checks a condition and branches into true / false
- Normalize Lead Data (Edit Fields (Set)): sets 6 fields: name, email, phone…
- Handle Validation Error (Edit Fields (Set)): sets 3 fields: error, status, timestamp
- AI Lead Enrichment & Scoring (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Store Lead in Database (Postgres): uses Postgres
- Round-Robin Sales Assignment (Code): runs custom JavaScript code
- Send to CRM (HTTP Request): calls an HTTP API (POST)
- Create Salesforce Lead (Salesforce): uses Salesforce
- Send Welcome Email (Gmail): uses Gmail
…plus 2 more steps. See the full node list below.
Services it uses
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.
Nodes used (12)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Postgres
n8n-nodes-base.postgres - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack - Salesforce
n8n-nodes-base.salesforce
From the author
Overview This workflow captures incoming leads from a webhook, enriches them using AI, and automates the entire sales pipeline. It validates data, scores leads as hot, warm, or cold, assigns them to sales reps, syncs with CRM systems, and triggers…