Classify and route form leads with DeepSeek, Gmail, and Google Sheets
Ready for 3.0What this workflow does
This workflow has 15 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Gmail and Google Sheets. It also calls api.deepseek.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Normalize Lead Data (Code): runs custom JavaScript code
- Validate Approval Decision (If): checks a condition and branches into true / false
- Check Lead Not Processed (Data table): row not exists
- Append Lead to Fulfillment Sheet (Google Sheets): append
- Mark Lead Processed (Data table): create or update (row)
- Display Approval Confirmation (Respond to Webhook): sends the response back to the webhook caller
- Classify and Score Lead (HTTP Request): calls api.deepseek.com (POST)
- Extract LLM Response Data (Code): runs custom JavaScript code
- Notify LLM Classification Failed (Gmail): uses Gmail
- Route by Lead Priority (Switch): routes items into 2 branches
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: api.deepseek.com
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 (9)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Data table
n8n-nodes-base.dataTable - HTTP Request
n8n-nodes-base.httpRequest - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview A webhook captures form leads, a Data Table blocks duplicates, and DeepSeek scores each lead from 1 to 100. A three-way switch routes high scores to an approval email, mid scores to a fast-track approval, and low scores to a polite decline. How…