This workflow corresponds to n8n.io template #7407 — we link there as the canonical source.
This workflow follows the Chainllm → Gmail 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 →
{
"nodes": [
{
"id": "b28b477c-281c-4371-9bc6-e9cdff0623cb",
"name": "Outlook Trigger1",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
-48,
1344
],
"parameters": {
"options": {},
"filtersUI": {
"values": {
"filters": {
"receivedAfter": "={{ $now.minus({ minutes: 30 }).toISO() }}"
}
}
},
"operation": "getAll"
},
"typeVersion": 2
},
{
"id": "51e582d1-d8ea-43f1-8db8-d8af869b41fe",
"name": "Webhook Trigger1",
"type": "n8n-nodes-base.webhook",
"position": [
-48,
1104
],
"parameters": {
"path": "support",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1.1
},
{
"id": "96a9a667-47e9-4103-b3ff-239a2fe0b888",
"name": "Normalize Data1",
"type": "n8n-nodes-base.function",
"position": [
160,
1232
],
"parameters": {
"functionCode": "const data = $input.all();\nconst result = [];\n\nfor (const item of data) {\n let normalized = {\n source: item.json.from ? 'email' : 'webhook',\n email: item.json.from?.emailAddress?.address || item.json.email,\n name: item.json.from?.emailAddress?.name || item.json.name,\n subject: item.json.subject || 'Web Request',\n message: item.json.body?.content || item.json.message,\n timestamp: new Date().toISOString()\n };\n result.push({ json: normalized });\n}\n\nreturn result;"
},
"typeVersion": 1
},
{
"id": "b6447498-d7ad-4733-bcd7-bbf0bae1cb1e",
"name": "Remove Duplicates1",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
368,
1232
],
"parameters": {
"options": {},
"operation": "removeItemsSeenInPreviousExecutions",
"dedupeValue": "={{ $json.email + $json.subject }}"
},
"typeVersion": 2
},
{
"id": "37505804-f4a2-445f-b751-bd4b5aa98062",
"name": "OpenAI Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
576,
1424
],
"parameters": {
"model": {
"value": "gpt-4o-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "d8a47dc8-7baa-414f-9ffb-c36f1ee87294",
"name": "JSON Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
768,
1424
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"category\": {\"type\": \"string\"},\n \"urgency\": {\"type\": \"string\"},\n \"expertise\": {\"type\": \"string\"},\n \"canAutoResolve\": {\"type\": \"boolean\"},\n \"isVIP\": {\"type\": \"boolean\"}\n }\n}"
},
"typeVersion": 1.2
},
{
"id": "8210bcfa-c0f1-4329-a7ba-8d3b0fa3e3ac",
"name": "Route Decision1",
"type": "n8n-nodes-base.if",
"position": [
928,
1232
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ff7f1bf0-0ce3-4eb3-a9de-1675a785f2c2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2
},
{
"id": "3ef69825-72c7-4d8c-9009-eba6a7591c19",
"name": "Auto Response1",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1184,
1056
],
"parameters": {
"operation": "sendMessage"
},
"typeVersion": 2
},
{
"id": "1bfa088a-9721-4975-a7b0-cea8d6225114",
"name": "Assign Agent1",
"type": "n8n-nodes-base.function",
"position": [
1184,
1328
],
"parameters": {
"functionCode": "const request = $json;\nconst expertise = request.output.expertise;\nconst isVIP = request.output.isVIP;\nconst urgency = request.output.urgency;\n\n// Agent assignment logic\nconst agents = {\n 'frontend': 'user@example.com',\n 'backend': 'user@example.com',\n 'business': 'user@example.com',\n 'support': 'user@example.com'\n};\n\nconst assignedAgent = agents[expertise] || agents['support'];\n\n// SLA calculation\nconst slaHours = {\n 'critical': isVIP ? 1 : 2,\n 'high': isVIP ? 4 : 8,\n 'medium': isVIP ? 8 : 24,\n 'low': 24\n};\n\nreturn [{\n json: {\n ...request,\n assignedAgent,\n slaHours: slaHours[urgency],\n priority: urgency === 'critical' ? 1 : urgency === 'high' ? 2 : 3\n }\n}];"
},
"typeVersion": 1
},
{
"id": "53f8485b-5287-433a-b7b7-e2e6356fd7ed",
"name": "Create JIRA Ticket1",
"type": "n8n-nodes-base.jira",
"position": [
1360,
1328
],
"parameters": {
"project": {
"value": "SUP"
},
"summary": "{{ $json.subject }}",
"issueType": {
"value": "Task"
},
"additionalFields": {
"labels": [
"{{ $json.output.category }}",
"{{ $json.source }}"
],
"assignee": {
"value": "{{ $json.assignedAgent }}"
},
"priority": {
"value": "{{ $json.priority }}"
},
"description": "Customer: {{ $json.name }} ({{ $json.email }})\nSource: {{ $json.source }}\nCategory: {{ $json.output.category }}\nUrgency: {{ $json.output.urgency }}\n{{ $json.output.isVIP ? 'VIP CUSTOMER' : '' }}\n\nMessage:\n{{ $json.message }}"
}
},
"typeVersion": 1
},
{
"id": "6d76ea6d-050c-4e36-a217-f6efd492217b",
"name": "Send Confirmation1",
"type": "n8n-nodes-base.gmail",
"position": [
1536,
1328
],
"parameters": {
"message": "Dear {{ $json.name }},\n\nYour support request has been received and assigned ticket #{{ $json.ticketKey }}.\n\nPriority: {{ $json.output.urgency }}{{ $json.output.isVIP ? ' (VIP)' : '' }}\nAssigned to: {{ $json.assignedAgent }}\nExpected response: {{ $json.slaHours }} hours\n\nWe'll update you as we work on your request.\n\nBest regards,\nSupport Team",
"options": {},
"subject": "Support Ticket Created - {{ $json.subject }}"
},
"typeVersion": 2.1
},
{
"id": "9811b90f-39a8-4c9d-9472-5ae94c29aa97",
"name": "Webhook Response1",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1728,
1056
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"status\": \"success\",\n \"message\": \"Request processed\",\n \"ticketId\": \"{{ $json.ticketKey || 'AUTO_RESOLVED' }}\"\n}"
},
"typeVersion": 1.1
},
{
"id": "2c96f390-163c-4b2a-8a69-ad53ffbfdd17",
"name": "AI Classifier2",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
592,
1232
],
"parameters": {
"text": "Subject: {{ $json.subject }}\nMessage: {{ $json.message }}\nFrom: {{ $json.name }} ({{ $json.email }})",
"messages": {
"messageValues": [
{
"message": "Classify this support request. Return JSON with:\n{\n \"category\": \"technical|billing|account|feature\",\n \"urgency\": \"critical|high|medium|low\",\n \"expertise\": \"frontend|backend|support|business\",\n \"canAutoResolve\": true|false,\n \"isVIP\": true|false\n}\n\nVIP indicators: enterprise email domains, mentions of \"enterprise\", \"premium\", urgent language.\nAuto-resolve: simple how-to questions, password resets, basic billing questions."
}
]
},
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "ea4bb972-004b-4214-b9a7-4a0fe0ce014d",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
528
],
"parameters": {
"color": 3,
"width": 464,
"height": 336,
"content": "## SMART SUPPORT AGENT\n\nThis workflow handles support requests from:\n- Outlook emails (shared inbox)\n- Web forms (webhook endpoint)\n\n### KEY FEATURES:\n\u2705 AI-powered classification\n\u2705 Auto-resolution for simple issues\n\u2705 Smart agent routing\n\u2705 SLA tracking\n"
},
"typeVersion": 1
},
{
"id": "23bd9e14-7a5a-4ac0-82da-8c901f422557",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
880
],
"parameters": {
"color": 3,
"width": 464,
"height": 400,
"content": "### CUSTOMIZE FOR YOUR TEAM\n\nSTEP 1: Update \"Assign Agent\" node\n\u2192 Edit function code\n\u2192 Replace email addresses with your team\n\nSTEP 2: Modify JIRA settings\n\u2192 \"Create JIRA Ticket\" node\n\u2192 Change project key from \"SUP\"\n\u2192 Update issue types if needed\n\nSTEP 3: Adjust SLA times\n\u2192 In \"Assign Agent\" function\n\u2192 Modify slaHours object values\n\nSTEP 4: Test webhook endpoint\n\u2192 https://your-n8n.com/webhook/support"
},
"typeVersion": 1
},
{
"id": "40549f86-6fc2-427c-b382-944c5f321fb3",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
528
],
"parameters": {
"width": 352,
"height": 1056,
"content": "### AI CLASSIFICATION TIPS\n\nThe AI determines:\n- Category (technical/billing/account/feature)\n- Urgency (critical/high/medium/low) \n- Who should handle it\n- If it can be auto-resolved\n\nTO IMPROVE ACCURACY:\n\u2192 Add examples to the prompt\n\u2192 Include your product-specific terms\n\u2192 Train with your actual tickets\n\nVIP DETECTION:\nCurrently looks for enterprise domains\n\u2192 Customize in the prompt!"
},
"typeVersion": 1
},
{
"id": "97a5075b-315d-406b-9e43-bf1f448eee67",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1104,
528
],
"parameters": {
"width": 288,
"height": 688,
"content": "### AUTO-RESOLUTION WORKS FOR:\n\n\u2705 Password reset requests\n\u2705 \"Where is my invoice?\" \n\u2705 Basic how-to questions\n\u2705 Documentation requests\n\u2705 Simple account questions\n\n### NEVER AUTO-RESOLVES:\n- Billing disputes\n- Security issues \n- Bug reports\n- VIP customer requests\n- Complex technical problems\n\nCUSTOMIZE: Edit the AI prompt to match your support patterns!"
},
"typeVersion": 1
},
{
"id": "6919f336-fc6b-4c46-b1dd-222b426c23cb",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
528
],
"parameters": {
"width": 336,
"height": 752,
"content": "### WEBHOOK INTEGRATION\n\nENDPOINT: /webhook/support\nMETHOD: POST\n\nREQUIRED FIELDS:\n{\n \"email\": \"customer@company.com\",\n \"name\": \"Customer Name\", \n \"message\": \"Support request text\"\n}\n\nOPTIONAL FIELDS:\n{\n \"subject\": \"Custom subject\",\n \"priority\": \"high\",\n \"source\": \"website\"\n}\n\nINTEGRATE WITH:\n- Contact forms\n- Chat widgets\n- Mobile apps\n- Other systems\n\nReturns: {\"status\":\"success\", \"ticketId\":\"...\"}"
},
"typeVersion": 1
}
],
"connections": {
"JSON Parser1": {
"ai_outputParser": [
[
{
"node": "AI Classifier2",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Assign Agent1": {
"main": [
[
{
"node": "Create JIRA Ticket1",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model1": {
"ai_languageModel": [
[
{
"node": "AI Classifier2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Classifier2": {
"main": [
[
{
"node": "Route Decision1",
"type": "main",
"index": 0
}
]
]
},
"Auto Response1": {
"main": [
[
{
"node": "Webhook Response1",
"type": "main",
"index": 0
}
]
]
},
"Normalize Data1": {
"main": [
[
{
"node": "Remove Duplicates1",
"type": "main",
"index": 0
}
]
]
},
"Route Decision1": {
"main": [
[
{
"node": "Auto Response1",
"type": "main",
"index": 0
}
],
[
{
"node": "Assign Agent1",
"type": "main",
"index": 0
}
]
]
},
"Outlook Trigger1": {
"main": [
[
{
"node": "Normalize Data1",
"type": "main",
"index": 0
}
]
]
},
"Webhook Trigger1": {
"main": [
[
{
"node": "Normalize Data1",
"type": "main",
"index": 0
}
]
]
},
"Remove Duplicates1": {
"main": [
[
{
"node": "AI Classifier2",
"type": "main",
"index": 0
}
]
]
},
"Send Confirmation1": {
"main": [
[
{
"node": "Webhook Response1",
"type": "main",
"index": 0
}
]
]
},
"Create JIRA Ticket1": {
"main": [
[
{
"node": "Send Confirmation1",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Multi-channel support (email + web forms) Smart routing to qualified agents based on expertise Consistent ticket creation with full context in JIRA Support teams handling 50+ requests/day SaaS companies with tiered customer support Organizations wanting to scale support without…
Source: https://n8n.io/workflows/7407/ — 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.
✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse. Uses gmail, gmailTrigger, limit, stickyNote. Webhook trigger; 54 nodes.
n8n Graphic Design Team. Uses googleSheets, googleDrive, httpRequest, outputParserStructured. Event-driven trigger; 37 nodes.
WordPress Contact Form (CF7) Responses and Classification. Uses lmChatGoogleGemini, textClassifier, gmail, chainLlm. Webhook trigger; 24 nodes.
Telegram Gmail. Uses outputParserStructured, lmChatOpenAi, telegram, openAi. Event-driven trigger; 24 nodes.
This workflow optimizes the management of inquiries received through a contact form (Contact Form 7 - CF7 Plugin) on a WordPress site, automating the process of classification, response drafting, and