Skip to main content

Qualify & route leads across channels with GPT-4o, Slack & CRM integration

Workflow preview

Workflow preview
100%
Qualify & route leads across channels with GPT-4o, Slack & CRM integration preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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

Best for

  • Lead Nurturing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.webhook, n8n-nodes-base.merge, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.switch, n8n-nodes-base.hubspot

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by NodeAlchemy.

Original n8n.io source

1.1 Workflow description

Title
Qualify & route leads across channels with GPT-4o, Slack & CRM integration
Workflow name
Qualify & route leads across channels with GPT-4o, Slack & CRM integration

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 your team on Slack, and logs all activity—including failures—to Google Sheets.

Use cases include: automating sales inboxes, qualifying form leads for agencies or SaaS products, routing high-fit prospects to the right territory owner, and keeping your sales and ops teams aligned without manual data entry.


Good to know

  • The OpenAI model is used for lead data extraction and will incur a small cost per run depending on volume.
  • This workflow supports either Salesforce or HubSpot as the CRM system—select which one in the configuration node.
  • You’ll need valid credentials for Gmail (or another email service), OpenAI, Slack, Google Sheets, and your chosen CRM before running.

How it works

  1. Triggers:

    • A Gmail trigger polls for new inbound emails.
    • A Webhook node receives submissions from any online form. Both sources merge into a single pipeline.
  2. Validation: Incoming data is checked for required fields (email or text). Invalid entries are routed to the Dead Letter Queue (DLQ) for review.

  3. AI Extraction: The OpenAI node extracts structured fields like company name, size, industry, role, region, problem statement, and budget signals from free-form text.

  4. Parsing & Scoring: The AI output is parsed, then a code node calculates a 0–100 lead score based on transparent criteria—industry, size, role, problem clarity, and budget mentions. It also assigns a lead tier (Hot, Warm, Cold, Unqualified).

  5. CRM Routing: Depending on your configuration, the workflow creates a Salesforce lead (default) or can be easily adapted for HubSpot. Territory or CRM owner routing can be extended here.

  6. Slack Notification: A rich Slack message summarizes the lead score and reasoning and includes a “Create intro email” button for quick action.

  7. Logging: All successful leads are logged to Google Sheets for reporting. Any failed or invalid leads are logged separately to the DLQ tab for auditing.


How to use

  • Configure your credentials for Gmail, OpenAI, Slack, Google Sheets, and your CRM.
  • Open the Workflow Configuration node and fill in your target industries, buyer roles, company size, Slack channel ID, Google Sheets URL, and CRM choice.
  • Create corresponding tabs in your Google Sheet for Leads and DLQ.
  • Test by sending a sample email or form submission, then watch the workflow extract, score, route, and notify automatically.

Requirements

  • OpenAI account for text extraction
  • Gmail (or other email provider) for the email trigger
  • Slack for lead notifications
  • Google Sheets for logging leads and DLQ entries
  • Salesforce or HubSpot account for CRM integration

Customizing this workflow

This template can be expanded in many ways:

  • Add HubSpot routing on the first Switch output.
  • Integrate a Slack button handler to auto-generate intro emails.
  • Add retry and backoff logic for resilience.
  • Modify the scoring rubric in the code node to match your unique ICP.
  • Connect additional sources, such as LinkedIn forms or landing page builders, for omnichannel lead capture.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Email Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.3

Block 2 - Form Submission Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 3 - Merge Inputs

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 4 - Workflow Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Validate Input Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Check Validation

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 7 - Parse AI Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Calculate Lead Score

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Route by Territory

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 10 - Create HubSpot Contact

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 11 - Create Salesforce Lead

Type / Role
n8n-nodes-base.salesforce - salesforce
Config choices
Version 1

Block 12 - Post to Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 13 - Log to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 14 - Log Validation Failure

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - Log Failed Leads

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note - Routing

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Extract Lead Data with AI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

3. Summary Table

Workflow Qualify & route leads across channels with GPT-4o, Slack & CRM integration
Complexity advanced
Nodes 19
Categories Lead Nurturing, AI Summarization
Author NodeAlchemy
Published 16 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9739/9739.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Qualify & route leads across channels with GPT-4o, Slack & CRM integration do?

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

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, AI Summarization use case.