Templates / Capture and enrich leads with GPT-4o, Postgres, Slack, Gmail and your CRM

Capture and enrich leads with GPT-4o, Postgres, Slack, Gmail and your CRM

Ready for 3.0

by ResilNext ✓ · 132 views · created 2026-04-03 · Lead Generation, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. Workflow Configuration (Edit Fields (Set)): sets 3 fields: crmApiUrl, slackChannel, salesReps
  2. Validate Required Fields (If): checks a condition and branches into true / false
  3. Normalize Lead Data (Edit Fields (Set)): sets 6 fields: name, email, phone…
  4. Handle Validation Error (Edit Fields (Set)): sets 3 fields: error, status, timestamp
  5. AI Lead Enrichment & Scoring (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
  6. Store Lead in Database (Postgres): uses Postgres
  7. Round-Robin Sales Assignment (Code): runs custom JavaScript code
  8. Send to CRM (HTTP Request): calls an HTTP API (POST)
  9. Create Salesforce Lead (Salesforce): uses Salesforce
  10. Send Welcome Email (Gmail): uses Gmail

…plus 2 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelPostgresGmailSlackSalesforce

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)

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…

Excerpt from ResilNext's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.