This workflow corresponds to n8n.io template #9346 — we link there as the canonical source.
This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "bCUSkhPOSflMbsvy",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Lead Intent Classification & Auto-Task Creator",
"tags": [],
"nodes": [
{
"id": "459aaea7-b063-49e9-8bef-76164a11b06c",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-4640,
-432
],
"parameters": {
"color": 6,
"width": 427,
"height": 657,
"content": "## \ud83c\udfaf Lead Intent Classification & Auto-Task Creator\n\n**Purpose:**\nAutomatically analyze incoming lead replies from Google Sheets, classify their intent using AI, and create appropriate follow-up tasks in ClickUp.\n\n**What This Workflow Does:**\n1. Reads new lead replies from Google Sheets every 15 minutes\n2. Uses Azure OpenAI (GPT-4) to classify intent (Demo Request, Pricing, Objection, etc.)\n3. Routes leads based on classified intent\n4. Creates tasks in ClickUp with appropriate due dates and descriptions\n5. Adds checklist items for follow-up actions\n\n**Business Value:**\n- Saves 2-3 hours daily on manual lead qualification\n- Ensures no lead falls through the cracks\n- Standardizes follow-up procedures\n- Provides clear next actions for sales team\n\n**Required Setup:**\n- Google Sheets with lead data\n- Azure OpenAI API access (GPT-4)\n- ClickUp workspace with appropriate lists\n\n"
},
"typeVersion": 1
},
{
"id": "39cde52f-1097-462a-a05c-487e57df7b27",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-4080,
-400
],
"parameters": {
"color": 4,
"width": 310,
"height": 318,
"content": "## \u23f0 Trigger Configuration\n\n**Runs every 15 minutes** to check for new lead replies.\n\n**Setup Instructions:**\n1. Adjust interval based on your needs (15min recommended)\n2. For high-volume: Use 5-10 minutes\n3. For low-volume: Use 30-60 minutes\n\n**Note:** First run will process all existing rows. Subsequent runs only process new data."
},
"typeVersion": 1
},
{
"id": "470ecd82-8ba2-4fe5-8fe9-c25d0ec007e0",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3712,
144
],
"parameters": {
"color": 4,
"width": 310,
"height": 440,
"content": "## \ud83d\udcca Google Sheets Setup\n\n**Required Sheet Columns:**\n- `leadId` - Unique identifier\n- `name` - Lead's full name\n- `email` - Contact email\n- `reply` - Customer's message\n- `company` - Company name (optional)\n\n**Important:**\n1. Replace the documentId with YOUR Google Sheet ID\n2. Sheet must be shared with your n8n service account\n3. Create a tab named \"GHL-Replies\"\n\n**Credential Setup:**\nUse Google Sheets OAuth2 authentication"
},
"typeVersion": 1
},
{
"id": "77c2e418-bd99-4ed3-8353-5a440bfb3dc9",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3440,
-448
],
"parameters": {
"color": 4,
"width": 310,
"height": 354,
"content": "## \ud83d\udd04 Data Preparation\n\n**Purpose:** Standardizes incoming data format for AI analysis.\n\n**What It Does:**\n- Extracts lead ID, name, email, company\n- Normalizes field names\n- Handles missing data gracefully\n- Prepares clean JSON for AI agent\n\n**Fallback Logic:** Uses data from previous node if current data is incomplete."
},
"typeVersion": 1
},
{
"id": "bb68a441-5b2b-462b-ac01-64c6a932e707",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3088,
-528
],
"parameters": {
"color": 4,
"width": 340,
"height": 428,
"content": "## \ud83e\udd16 AI Intent Classification\n\n**Model:** Azure OpenAI GPT-4\n\n**Intent Categories:**\n1. **DEMO_REQUEST** - Wants product demo\n2. **PRICING_INQUIRY** - Asking about costs\n3. **OBJECTION** - Has concerns/questions\n4. **POSITIVE_INTEREST** - General interest\n5. **NOT_INTERESTED** - Declined/closed\n\n**Setup Required:**\n1. Add your Azure OpenAI credentials\n2. Ensure GPT-4 deployment is active\n3. Test with sample leads first\n\n**Output:** Structured JSON with intent, next step, and reasoning"
},
"typeVersion": 1
},
{
"id": "88239fc8-39a3-4b36-ad88-cbc588d67aa1",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2736,
112
],
"parameters": {
"color": 4,
"width": 300,
"height": 292,
"content": "## \ud83d\udce4 Extract AI Results\n\n**Purpose:** Pulls out the classified intent and preserves original lead data.\n\n**Output Fields:**\n- `intent` - Classified category\n- `originalData` - All lead information for downstream nodes\n\n**Next:** Routes to appropriate handler based on intent"
},
"typeVersion": 1
},
{
"id": "00e4648c-833f-49cb-a722-7d1e56f5f980",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2592,
-384
],
"parameters": {
"color": 4,
"width": 310,
"height": 280,
"content": "## \ud83d\udd00 Intent-Based Router\n\n**Routes leads to specialized handlers:**\n\n**Output 0:** Demo Requests \u2192 Schedule demo tasks\n**Output 1:** Pricing Inquiries \u2192 Send pricing info\n**Output 2:** Objections \u2192 Address concerns\n**Output 3:** Default/Other \u2192 General follow-up\n\n**Logic:** Exact string matching on intent field (case-sensitive)"
},
"typeVersion": 1
},
{
"id": "0279d00f-62f5-41a1-b0b9-78043b10e3bb",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2208,
-560
],
"parameters": {
"color": 4,
"width": 260,
"height": 240,
"content": "## \ud83c\udfaf Demo Request Handler\n\n**Creates:**\n- Next Step: \"Schedule Demo\"\n- Pipeline Stage: \"Demo Scheduled\"\n- Due Date: +2 days\n- Task: Contact lead to schedule product demo\n\n**Use Case:** Lead wants to see the product in action"
},
"typeVersion": 1
},
{
"id": "f04f84aa-4d57-4540-8f0e-ed64644c70ba",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2112,
-304
],
"parameters": {
"color": 4,
"width": 260,
"height": 240,
"content": "## \ud83d\udcb0 Pricing Handler\n\n**Creates:**\n- Next Step: \"Send Pricing Information\"\n- Pipeline Stage: \"Pricing Sent\"\n- Due Date: +1 day (urgent!)\n- Task: Send pricing details immediately\n\n**Use Case:** Lead is budget-conscious and needs costs"
},
"typeVersion": 1
},
{
"id": "c7b9a0b8-4865-40f3-93d6-f7b18999462c",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2272,
48
],
"parameters": {
"color": 4,
"width": 260,
"height": 240,
"content": "## \u26a0\ufe0f Objection Handler\n\n**Creates:**\n- Next Step: \"Address Objections\"\n- Pipeline Stage: \"Objection Handling\"\n- Due Date: +1 day (high priority)\n- Task: Follow up to handle concerns\n\n**Use Case:** Lead has doubts or needs clarification"
},
"typeVersion": 1
},
{
"id": "d90a37e7-b9aa-4edf-a500-fb82a353a919",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2336,
400
],
"parameters": {
"color": 4,
"width": 260,
"height": 288,
"content": "## \ud83d\udccb Default Handler\n\n**Creates:**\n- Next Step: \"General Follow-up\"\n- Pipeline Stage: \"Follow-up Required\"\n- Due Date: +3 days\n- Task: General check-in with lead\n\n**Use Case:** Positive interest or unclear intent"
},
"typeVersion": 1
},
{
"id": "2ef06501-173b-44d3-a44a-40d5a8790861",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1968,
112
],
"parameters": {
"color": 4,
"width": 340,
"height": 380,
"content": "## \u2705 ClickUp Task Creation\n\n**Setup Required:**\n1. Replace `team`, `space`, `folder`, `list` IDs with YOUR ClickUp workspace IDs\n2. Add your ClickUp API credentials\n3. Set default priority (currently: 3 = Normal)\n\n**Task Fields:**\n- Name: Combines next step + lead name\n- Due Date: Calculated based on intent\n- Priority: Set to 3 (adjust as needed)\n\n**How to Find IDs:**\nGo to ClickUp \u2192 Settings \u2192 Integrations \u2192 API \u2192 Copy IDs from URL"
},
"typeVersion": 1
},
{
"id": "bcbc559b-a719-4c36-a66d-9cc497405f17",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1808,
-464
],
"parameters": {
"color": 4,
"width": 300,
"height": 280,
"content": "## \ud83d\udd01 Batch Processing Loop\n\n**Purpose:** Processes checklist items one at a time to avoid rate limits.\n\n**How It Works:**\n1. Takes all tasks from previous node\n2. Processes them sequentially\n3. Adds checklist to each task\n4. Loops until all items processed\n\n**Why Needed:** ClickUp API has rate limits (100 req/min)"
},
"typeVersion": 1
},
{
"id": "16fe369c-b9db-4e47-ba6b-ad448b563afc",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1472,
-560
],
"parameters": {
"color": 4,
"width": 300,
"height": 372,
"content": "## \ud83d\udcdd Add Checklist to Task\n\n**HTTP Request to ClickUp API**\n\n**Endpoint:** `/api/v2/task/{taskId}/checklist`\n\n**Purpose:** Creates a checklist on each task for structured follow-up.\n\n**Current Checklist:** Named using task name\n\n**Auth:** Uses ClickUp API credentials (same as task creation)"
},
"typeVersion": 1
},
{
"id": "4ba5d303-ef8c-4ed0-839f-122f41113e68",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-592
],
"parameters": {
"color": 4,
"width": 300,
"height": 448,
"content": "## \u2714\ufe0f Add Checklist Item\n\n**HTTP Request to ClickUp API**\n\n**Endpoint:** `/api/v2/checklist/{checklistId}/checklist_item`\n\n**Purpose:** Adds \"Follow-up\" item to checklist.\n\n**Customization:**\nModify the JSON body to add multiple items:\n```json\n{\n \"name\": \"Send follow-up email\",\n \"assignee\": 12345\n}\n```"
},
"typeVersion": 1
},
{
"id": "1e68f4bc-f4bd-4af2-b7ed-7fd9dfb2235a",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-3856,
-48
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 15
}
]
}
},
"typeVersion": 1.2
},
{
"id": "1f085d74-3a29-471b-b2ae-ef8cbd64f36b",
"name": "Google Sheets - Read New Replies",
"type": "n8n-nodes-base.googleSheets",
"position": [
-3616,
-48
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "GHL-Replies",
"cachedResultUrl": "",
"cachedResultName": "GHL-Replies"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_SHEET_ID_HERE",
"cachedResultUrl": "",
"cachedResultName": "Lead Replies Sheet"
}
},
"typeVersion": 4.5,
"continueOnFail": true
},
{
"id": "5245b1fa-602f-4828-8183-408174a479f4",
"name": "Prepare Data for Classification",
"type": "n8n-nodes-base.set",
"position": [
-3328,
-48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"name": "leadId",
"type": "string",
"value": "={{ $json.id || $('Google Sheets - Read New Replies').item.json.leadId }}"
},
{
"id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
"name": "leadName",
"type": "string",
"value": "={{ $json.name || $('Google Sheets - Read New Replies').item.json.name }}"
},
{
"id": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f",
"name": "replyMessage",
"type": "string",
"value": "={{ $json.lastMessage || $('Google Sheets - Read New Replies').item.json.reply }}"
},
{
"id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",
"name": "email",
"type": "string",
"value": "={{ $json.email || $('Google Sheets - Read New Replies').item.json.email }}"
},
{
"id": "2c3f0d08-1375-4823-a2cc-6d7045170505",
"name": "company",
"type": "string",
"value": "={{ $json.company }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4fcec8d6-582c-4577-aff9-43f8f907388c",
"name": "Extract Intent Result",
"type": "n8n-nodes-base.set",
"position": [
-2640,
-48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b",
"name": "intent",
"type": "string",
"value": "={{ $json.output.intent }}"
},
{
"id": "f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f9a0b1c",
"name": "originalData",
"type": "object",
"value": "={{ $('Prepare Data for Classification').item.json }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5ec53360-525a-4b8f-be3e-2467a96e1594",
"name": "Switch - Intent Router",
"type": "n8n-nodes-base.switch",
"position": [
-2416,
-80
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "00b518ca-667a-4d4f-b59e-1f38ddaccc84",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.intent }}",
"rightValue": "DEMO_REQUEST"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c185e340-f6b3-43b5-8ebf-eca309911091",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.intent }}",
"rightValue": "PRICING_INQUIRY"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1e763f7a-02cb-468b-9520-6f38f074b1e0",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.intent }}",
"rightValue": "OBJECTION"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "561cd828-dfb5-4413-b27c-b345eabbd4ad",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.intent }}",
"rightValue": "NOT_INTERESTED"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "266880e3-7214-437d-ab0c-336e5206bed1",
"name": "Map Demo Next Steps",
"type": "n8n-nodes-base.set",
"position": [
-2192,
-336
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",
"name": "nextStep",
"type": "string",
"value": "Schedule Demo"
},
{
"id": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b",
"name": "pipelineStage",
"type": "string",
"value": "Demo Scheduled"
},
{
"id": "f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f9a0b1c",
"name": "dueDate",
"type": "string",
"value": "={{ $now.plus(2, 'days').toFormat('yyyy-MM-dd') }}"
},
{
"id": "a7b8c9d0-e1f2-3a4b-5c6d-7e8f9a0b1c2d",
"name": "taskDescription",
"type": "string",
"value": "=Contact {{ $json.originalData.leadName }} to schedule product demo"
},
{
"id": "e9e63b9d-cc67-44b2-b869-6337b47873f7",
"name": "leadName",
"type": "string",
"value": "={{ $json.originalData.leadName }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "dd03ffb4-e238-4394-8f4a-86260d804e52",
"name": "Map Pricing Next Steps",
"type": "n8n-nodes-base.set",
"position": [
-2192,
-144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b8c9d0e1-f2a3-4b5c-6d7e-8f9a0b1c2d3e",
"name": "nextStep",
"type": "string",
"value": "Send Pricing Information"
},
{
"id": "c9d0e1f2-a3b4-5c6d-7e8f-9a0b1c2d3e4f",
"name": "pipelineStage",
"type": "string",
"value": "Pricing Sent"
},
{
"id": "d0e1f2a3-b4c5-6d7e-8f9a-0b1c2d3e4f5a",
"name": "dueDate",
"type": "string",
"value": "={{ $now.plus(1, 'days').toFormat('yyyy-MM-dd') }}"
},
{
"id": "e1f2a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b",
"name": "taskDescription",
"type": "string",
"value": "=Send pricing details to {{ $json.originalData.leadName }}"
},
{
"id": "61a9bbdc-ac95-47e1-8c31-1321b00e236b",
"name": "leadName",
"type": "string",
"value": "={{ $json.originalData.leadName }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5446284f-417e-4c2e-81aa-b86493655b5f",
"name": "Map Objection Next Steps",
"type": "n8n-nodes-base.set",
"position": [
-2192,
64
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f2a3b4c5-d6e7-8f9a-0b1c-2d3e4f5a6b7c",
"name": "nextStep",
"type": "string",
"value": "Address Objections"
},
{
"id": "a3b4c5d6-e7f8-9a0b-1c2d-3e4f5a6b7c8d",
"name": "pipelineStage",
"type": "string",
"value": "Objection Handling"
},
{
"id": "b4c5d6e7-f8a9-0b1c-2d3e-4f5a6b7c8d9e",
"name": "dueDate",
"type": "string",
"value": "={{ $now.plus(1, 'days').toFormat('yyyy-MM-dd') }}"
},
{
"id": "c5d6e7f8-a9b0-1c2d-3e4f-5a6b7c8d9e0f",
"name": "taskDescription",
"type": "string",
"value": "=Follow up with {{ $json.originalData.leadName }} to handle objections"
},
{
"id": "cf8edd3b-9e69-47fc-8c2b-9e854054dbaa",
"name": "leadName",
"type": "string",
"value": "={{ $json.originalData.leadName }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "3f6ba43a-5440-4055-b6a2-66f3342b7e7a",
"name": "Map Default Next Steps",
"type": "n8n-nodes-base.set",
"position": [
-2192,
256
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d6e7f8a9-b0c1-2d3e-4f5a-6b7c8d9e0f1a",
"name": "nextStep",
"type": "string",
"value": "General Follow-up"
},
{
"id": "e7f8a9b0-c1d2-3e4f-5a6b-7c8d9e0f1a2b",
"name": "pipelineStage",
"type": "string",
"value": "Follow-up Required"
},
{
"id": "f8a9b0c1-d2e3-4f5a-6b7c-8d9e0f1a2b3c",
"name": "dueDate",
"type": "string",
"value": "={{ $now.plus(3, 'days').toFormat('yyyy-MM-dd') }}"
},
{
"id": "a9b0c1d2-e3f4-5a6b-7c8d-9e0f1a2b3c4d",
"name": "taskDescription",
"type": "string",
"value": "=General follow-up with {{ $json.originalData.leadName }}"
},
{
"id": "5f4c3b36-8730-4380-9915-de238751ff1e",
"name": "leadName",
"type": "string",
"value": "={{ $json.originalData.leadName }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7c2cafdf-9ef3-4d39-a4e4-2a2848adc37b",
"name": "ClickUp - Create Task",
"type": "n8n-nodes-base.clickUp",
"position": [
-1952,
-48
],
"parameters": {
"list": "YOUR_CLICKUP_LIST_ID",
"name": "={{ $json.nextStep }} - {{ $json.leadName }}",
"team": "YOUR_CLICKUP_TEAM_ID",
"space": "YOUR_CLICKUP_SPACE_ID",
"folder": "YOUR_CLICKUP_FOLDER_ID",
"additionalFields": {
"dueDate": "={{ $json.dueDate }}",
"priority": 3
}
},
"typeVersion": 1,
"continueOnFail": true
},
{
"id": "9006aebc-c98b-4d0d-9193-ecf66ab7000a",
"name": "ClickUp - Add Checklist Subtasks",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1456,
-128
],
"parameters": {
"url": "=https://api.clickup.com/api/v2/task/{{$json.id}}/checklist",
"method": "POST",
"options": {},
"jsonBody": "={ \"name\": \"{{ $json.name }}\" }",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "clickUpApi"
},
"typeVersion": 4.2,
"continueOnFail": true
},
{
"id": "0a709cfa-deba-4bb9-8fae-37f43af79d3b",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-2848,
192
],
"parameters": {
"jsonSchemaExample": "{\n \"leadId\": \"\",\n \"leadName\": \"\",\n \"email\": \"\",\n \"intent\": \"\",\n \"nextStep\": \"\",\n \"pipelineStage\": \"\",\n \"dueDateDaysFromNow\": 0,\n \"taskDescription\": \"\",\n \"reasoning\": \"\"\n}\n"
},
"typeVersion": 1.3
},
{
"id": "d64810b1-1be6-4111-a4c5-9505b5c94d76",
"name": "Azure OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
-3104,
192
],
"parameters": {
"model": "gpt-4o",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "278f0d3e-5c75-4cef-a627-329e312f4148",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-2976,
192
],
"parameters": {
"sessionKey": "\"lead_intent_classifier\"",
"sessionIdType": "customKey",
"contextWindowLength": 7
},
"typeVersion": 1.3
},
{
"id": "f3a3fa62-6f83-42b2-a5bf-2a7e5f24dfd6",
"name": "HTTP Request - Add Checklist Item",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1184,
-128
],
"parameters": {
"url": "=https://api.clickup.com/api/v2/checklist/{{ $json.checklist.id }}/checklist_item",
"method": "POST",
"options": {},
"jsonBody": "{ \"name\": \"Follow-up\" }",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "clickUpApi"
},
"typeVersion": 4.2
},
{
"id": "0dcda4be-7ec8-4c20-afbf-e459c5cdd1d9",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-1744,
-144
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "ec1ba010-3793-4f81-b7bb-c61cb99fc524",
"name": "AI Intent Classification",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-3056,
-48
],
"parameters": {
"text": "=Analyze this lead information and classify their intent:\n\n**Lead Details:**\n- Lead ID: {{ $json.leadId }}\n- Name: {{ $json.leadName }}\n- Email: {{ $json.email }}\n- Company: {{ $json.company }}\n\n**Customer Reply:**\n\"{{ $json.replyMessage }}\"\n\nPlease classify this reply and provide the structured output with intent, next step, pipeline stage, due date, and task description.",
"options": {
"systemMessage": "=You are an expert sales intent classifier. Your job is to analyze customer replies and determine their intent with high accuracy.\n\n**Your Task:**\n1. Analyze the customer's reply message\n2. Classify it into ONE of these intent categories:\n - DEMO_REQUEST: Customer wants to see a demo, product walkthrough, or live presentation\n - PRICING_INQUIRY: Customer is asking about pricing, costs, payment plans, discounts, or budget\n - OBJECTION: Customer has concerns, objections, security questions, or needs clarification\n - POSITIVE_INTEREST: General positive response, shows interest but no specific ask\n - NOT_INTERESTED: Customer declines, not interested, or already has a solution\n\n3. Based on the intent, determine the appropriate next step:\n - DEMO_REQUEST \u2192 \"Schedule Demo\"\n - PRICING_INQUIRY \u2192 \"Send Pricing Information\"\n - OBJECTION \u2192 \"Address Objections\"\n - POSITIVE_INTEREST \u2192 \"General Follow-up\"\n - NOT_INTERESTED \u2192 \"Mark as Closed\"\n\n4. Map to the correct pipeline stage:\n - DEMO_REQUEST \u2192 \"Demo Scheduled\"\n - PRICING_INQUIRY \u2192 \"Pricing Sent\"\n - OBJECTION \u2192 \"Objection Handling\"\n - POSITIVE_INTEREST \u2192 \"Follow-up Required\"\n - NOT_INTERESTED \u2192 \"Closed - Not Interested\"\n\n5. Set due date (days from today):\n - DEMO_REQUEST \u2192 2 days\n - PRICING_INQUIRY \u2192 1 day\n - OBJECTION \u2192 1 day\n - POSITIVE_INTEREST \u2192 3 days\n - NOT_INTERESTED \u2192 No due date\n\n**Important Rules:**\n- Be decisive - choose the MOST relevant intent\n- If multiple intents are present, prioritize in this order: DEMO_REQUEST > PRICING_INQUIRY > OBJECTION > POSITIVE_INTEREST > NOT_INTERESTED\n- Look for keywords: \"demo\", \"show me\", \"walkthrough\" = DEMO_REQUEST; \"price\", \"cost\", \"how much\" = PRICING_INQUIRY; \"concern\", \"worry\", \"but\", \"however\" = OBJECTION\n- Always provide a clear, actionable next step\n\nImportant: Output ONLY valid JSON matching the schema. \nDo NOT include ```json fences, markdown, or extra text. \nDo NOT wrap inside an \"output\" field. Just return the object directly.\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "925788be-3638-41d0-9563-aacec858fa96",
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Intent Classification",
"type": "ai_memory",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "ClickUp - Add Checklist Subtasks",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Google Sheets - Read New Replies",
"type": "main",
"index": 0
}
]
]
},
"Map Demo Next Steps": {
"main": [
[
{
"node": "ClickUp - Create Task",
"type": "main",
"index": 0
}
]
]
},
"ClickUp - Create Task": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Extract Intent Result": {
"main": [
[
{
"node": "Switch - Intent Router",
"type": "main",
"index": 0
}
]
]
},
"Map Default Next Steps": {
"main": [
[
{
"node": "ClickUp - Create Task",
"type": "main",
"index": 0
}
]
]
},
"Map Pricing Next Steps": {
"main": [
[
{
"node": "ClickUp - Create Task",
"type": "main",
"index": 0
}
]
]
},
"Switch - Intent Router": {
"main": [
[
{
"node": "Map Demo Next Steps",
"type": "main",
"index": 0
}
],
[
{
"node": "Map Pricing Next Steps",
"type": "main",
"index": 0
}
],
[
{
"node": "Map Objection Next Steps",
"type": "main",
"index": 0
}
],
[
{
"node": "Map Default Next Steps",
"type": "main",
"index": 0
}
]
]
},
"Azure OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Intent Classification",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Intent Classification": {
"main": [
[
{
"node": "Extract Intent Result",
"type": "main",
"index": 0
}
]
]
},
"Map Objection Next Steps": {
"main": [
[
{
"node": "ClickUp - Create Task",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Intent Classification",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Prepare Data for Classification": {
"main": [
[
{
"node": "AI Intent Classification",
"type": "main",
"index": 0
}
]
]
},
"ClickUp - Add Checklist Subtasks": {
"main": [
[
{
"node": "HTTP Request - Add Checklist Item",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets - Read New Replies": {
"main": [
[
{
"node": "Prepare Data for Classification",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request - Add Checklist Item": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
azureOpenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automatically analyze incoming lead replies from Google Sheets using Azure OpenAI GPT-4, classify their intent (Demo Request, Pricing, Objection, etc.), and create actionable follow-up tasks in ClickUp — all without manual intervention. Streamline your sales response workflow…
Source: https://n8n.io/workflows/9346/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow was born out of a very real problem.
Automate post-purchase workflows by instantly fetching successful Stripe payments, matching them to corresponding automation templates in Google Sheets, and sending customers personalized access email
This n8n workflow automates the daily monitoring of trends across X (Twitter), newsletters, and websites. It runs on a schedule, fetches data from configured sources in Google Sheets, processes it usi
YogiAI. Uses lmChatAzureOpenAi, googleSheets, outputParserAutofixing, outputParserStructured. Scheduled trigger; 31 nodes.
Top Branch Workflow The Data Scientist: Ingest: Pulls historical sales data from Google Sheets. Math Engine: Runs 7 statistical algorithms (e.g., Seasonal Naive, Linear Trend, Regression). It backtest