This workflow corresponds to n8n.io template #4474 — we link there as the canonical source.
This workflow follows the Agent → Error Trigger 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": "iYX4vUmfNoVCA86T",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "\ud83e\udd16 Smart Customer Support AI Agent",
"tags": [],
"nodes": [
{
"id": "696a1b2e-8f22-46ec-8fdd-3c7bb25f8429",
"name": "\ud83d\udccb Workflow Guide",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
660
],
"parameters": {
"color": 6,
"width": 400,
"height": 1040,
"content": "## \ud83e\udd16 Smart Customer Support AI Agent\n\n**Who is this for?**\nSmall to medium businesses, e-commerce stores, SaaS companies, and service providers who want to automate their customer support while maintaining a personal touch.\n\n**What problem does this solve?**\n- Reduces response time to customer inquiries\n- Handles repetitive questions automatically\n- Provides 24/7 customer support coverage\n- Maintains consistent brand voice across channels\n- Escalates complex issues to human agents\n\n**What this workflow does:**\n1. Monitors Gmail and Telegram for customer messages\n2. Uses AI to understand customer intent and context\n3. Accesses your knowledge base (Google Sheets) for accurate responses\n4. Sends personalized, contextual replies\n5. Escalates complex issues to human agents\n6. Logs all interactions for analysis\n\n**FIXES APPLIED:**\n- Separated Gmail and Telegram processing paths\n- Individual AI agents for each channel\n- Proper conversation memory management\n- Channel-specific response handling\n\n**Setup Instructions:**\n1. Configure Gmail OAuth2 credentials\n2. Set up Telegram bot token\n3. Create your knowledge base in Google Sheets\n4. Add your OpenAI API key\n5. Customize the AI prompts for your business\n6. Test with sample customer inquiries\n\n**Customization Tips:**\n- Update the knowledge base with your FAQs\n- Modify AI prompts to match your brand voice\n- Add more communication channels as needed\n- Set up escalation rules for complex cases"
},
"typeVersion": 1
},
{
"id": "47324b70-8be7-4e92-a739-2ff60f37d14a",
"name": "\ud83d\udcac Telegram Customer Message Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
1500,
1220
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "23ce0479-3ab0-4150-b893-3e08ed83fd73",
"name": "\ud83d\udccb Process Telegram Message",
"type": "n8n-nodes-base.set",
"position": [
1780,
1240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "channel",
"name": "channel",
"type": "string",
"value": "telegram"
},
{
"id": "customer_name",
"name": "customer_name",
"type": "string",
"value": "={{ $json.message.from.first_name }} {{ $json.message.from.last_name }}"
},
{
"id": "customer_id",
"name": "customer_id",
"type": "string",
"value": "={{ $json.message.from.id }}"
},
{
"id": "chat_id",
"name": "chat_id",
"type": "string",
"value": "={{ $json.message.chat.id }}"
},
{
"id": "message_content",
"name": "message_content",
"type": "string",
"value": "={{ $json.message.text }}"
},
{
"id": "message_id",
"name": "message_id",
"type": "string",
"value": "={{ $json.message.message_id }}"
},
{
"id": "subject",
"name": "subject",
"type": "string",
"value": "Customer Support Inquiry"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "686affeb-1afb-45cf-b9b0-f3ba6c6ffb94",
"name": "\ud83e\udd16 Telegram AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2080,
1180
],
"parameters": {
"text": "={{ $json.message_content}}",
"options": {
"systemMessage": "You are a helpful and professional customer support AI assistant for Telegram inquiries. Your role is to:\n\n1. Understand customer inquiries and provide accurate, helpful responses\n2. Use the knowledge base tool to find relevant information\n3. Maintain a friendly, professional tone that matches the company brand\n4. If you cannot fully resolve an issue, escalate it appropriately\n5. Always aim to provide value and resolve customer concerns\n\nImportant guidelines:\n- Be empathetic and understanding\n- Provide clear, actionable responses\n- Use the customer's name when possible\n- If information is not in the knowledge base, say so honestly\n- For complex technical issues, recommend escalation to human support\n\nCompany context: You represent a professional service business focused on customer satisfaction and quality support via Telegram."
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "a5e67d73-73c2-4756-9c82-9c05c1dbc36a",
"name": "\ud83e\udde0 OpenAI Chat Model - Telegram",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1900,
1420
],
"parameters": {
"options": {
"maxTokens": 100,
"temperature": 0.3
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "bfa0f8a9-58cc-4c15-8d7e-d633c23e10a6",
"name": "\ud83e\udde0 Telegram Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
2080,
1440
],
"parameters": {
"sessionKey": "telegram_{{ $json.customer_id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "64a05368-29f5-4333-b881-b0ba73e424cb",
"name": "\ud83d\udcac Send Telegram Reply",
"type": "n8n-nodes-base.telegram",
"position": [
2460,
1120
],
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('\ud83d\udccb Process Telegram Message').item.json.chat_id }}",
"additionalFields": {
"parse_mode": "Markdown",
"reply_to_message_id": "={{ $('\ud83d\udccb Process Telegram Message').item.json.message_id }}"
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "64c36c02-b56d-45dd-b3bf-4f49b3e14b5c",
"name": "\ud83d\udce7 Gmail Customer Inquiry Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
1540,
720
],
"parameters": {
"filters": {
"labelIds": [
"INBOX",
"CATEGORY_PERSONAL"
],
"readStatus": "unread"
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "baf01d18-d626-4b5c-bbc9-ac45c83b8e0b",
"name": "\ud83d\udccb Process Gmail Message",
"type": "n8n-nodes-base.set",
"position": [
1740,
720
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "channel",
"name": "channel",
"type": "string",
"value": "gmail"
},
{
"id": "customer_email",
"name": "customer_email",
"type": "string",
"value": "={{ $json[\"From\"].match(/<(.*?)>/)?.[1] || $json[\"From\"] }}"
},
{
"id": "customer_name",
"name": "customer_name",
"type": "string",
"value": "={{ $json[\"From\"].split(\" <\")[0] }}"
},
{
"id": "subject",
"name": "subject",
"type": "string",
"value": "={{ $json.Subject }}"
},
{
"id": "message_content",
"name": "message_content",
"type": "string",
"value": "={{ $json.text || $json.snippet }}"
},
{
"id": "message_id",
"name": "message_id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "thread_id",
"name": "thread_id",
"type": "string",
"value": "={{ $json.threadId }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4d1c0b8a-9fed-4977-8ec4-91cb4460c2b6",
"name": "\ud83e\udd16 Gmail AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1940,
720
],
"parameters": {
"text": "={{ $json.message_content}}",
"options": {
"systemMessage": "You are a helpful and professional customer support AI assistant for Email inquiries. Your role is to:\n\n1. Understand customer inquiries and provide accurate, helpful responses\n2. Use the knowledge base tool to find relevant information\n3. Maintain a friendly, professional tone that matches the company brand\n4. If you cannot fully resolve an issue, escalate it appropriately\n5. Always aim to provide value and resolve customer concerns\n\nImportant guidelines:\n- Be empathetic and understanding\n- Provide clear, actionable responses\n- Use the customer's name when possible\n- If information is not in the knowledge base, say so honestly\n- For complex technical issues, recommend escalation to human support\n- Format responses appropriately for email\n\nCompany context: You represent a professional service business focused on customer satisfaction and quality support via Email."
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "8da4c0b1-86b7-436b-8d73-e96d3777be29",
"name": "\ud83e\udde0 OpenAI Chat Model - Gmail",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1900,
900
],
"parameters": {
"options": {
"maxTokens": 1000,
"temperature": 0.3
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "b4cb3e8b-3d5c-49fb-9cc2-f46ffe4cd683",
"name": "\ud83e\udde0 Gmail Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
2040,
980
],
"parameters": {
"sessionKey": "gmail_{{ $json.customer_email }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "442e8879-e6c3-4cd6-8f3b-3f64879047c1",
"name": "\ud83d\udce7 Send Gmail Reply",
"type": "n8n-nodes-base.gmail",
"position": [
2240,
720
],
"parameters": {
"message": "={{ $json.output }}",
"options": {
"ccList": "",
"bccList": "",
"replyToSenderOnly": true
},
"messageId": "={{ $('\ud83d\udccb Process Gmail Message').item.json.message_id }}",
"operation": "reply"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "668afdd0-f68b-45cb-afde-93ebaf7627d3",
"name": "\u2705 Mark Gmail as Read",
"type": "n8n-nodes-base.gmail",
"position": [
2480,
620
],
"parameters": {
"messageId": "={{ $('\ud83d\udccb Process Gmail Message').item.json.message_id }}",
"operation": "markAsRead"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "2233ac1c-b704-4485-a4dd-3d873fb04538",
"name": "\ud83d\udcca Log Gmail Interaction",
"type": "n8n-nodes-base.googleSheets",
"position": [
2540,
820
],
"parameters": {
"columns": {
"value": {
"Status": "Completed",
"Channel": "Email",
"Timestamp": "={{ new Date().toISOString() }}",
"AI_Response": "={{ $('\ud83e\udd16 Gmail AI Agent').item.json.output }}",
"Customer_Name": "={{ $('\ud83d\udccb Process Gmail Message').item.json.customer_name }}",
"Response_Time": "={{ new Date().toISOString() }}",
"Inquiry_Subject": "={{ $json.subject || 'General Inquiry' }}",
"Customer_Contact": "={{ $('\ud83d\udccb Process Gmail Message').item.json.customer_email }}",
"Customer_Message": "={{ $('\ud83d\udccb Process Gmail Message').item.json.message_content }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Channel",
"type": "string",
"display": true,
"required": false,
"displayName": "Channel",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer_Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Customer_Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer_Contact",
"type": "string",
"display": true,
"required": false,
"displayName": "Customer_Contact",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Inquiry_Subject",
"type": "string",
"display": true,
"required": false,
"displayName": "Inquiry_Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer_Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Customer_Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI_Response",
"type": "string",
"display": true,
"required": false,
"displayName": "AI_Response",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Response_Time",
"type": "string",
"display": true,
"required": false,
"displayName": "Response_Time",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1087576053,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit#gid=1087576053",
"cachedResultName": "AI_Responses"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit?usp=drivesdk",
"cachedResultName": "customer_support_knowledge_base"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "6e641113-9da3-430c-873d-59fd0c2997fb",
"name": "\ud83d\udcca Log Telegram Interaction",
"type": "n8n-nodes-base.googleSheets",
"position": [
2760,
960
],
"parameters": {
"columns": {
"value": {
"Status": "Completed",
"Channel": "={{ $('\ud83d\udccb Process Telegram Message').item.json.channel }}",
"Timestamp": "={{ new Date().toISOString() }}",
"AI_Response": "={{ $json.output }}",
"Customer_Name": "={{ $('\ud83d\udccb Process Telegram Message').item.json.customer_name }}",
"Response_Time": "={{ new Date().toISOString() }}",
"Inquiry_Subject": "={{ $('\ud83d\udccb Process Telegram Message').item.json.subject }}",
"Customer_Contact": "={{ $('\ud83d\udccb Process Telegram Message').item.json.customer_id }}",
"Customer_Message": "={{ $('\ud83d\udccb Process Telegram Message').item.json.message_content }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Channel",
"type": "string",
"display": true,
"required": false,
"displayName": "Channel",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer_Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Customer_Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer_Contact",
"type": "string",
"display": true,
"required": false,
"displayName": "Customer_Contact",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Inquiry_Subject",
"type": "string",
"display": true,
"required": false,
"displayName": "Inquiry_Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer_Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Customer_Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI_Response",
"type": "string",
"display": true,
"required": false,
"displayName": "AI_Response",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Response_Time",
"type": "string",
"display": true,
"required": false,
"displayName": "Response_Time",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1087576053,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit#gid=1087576053",
"cachedResultName": "AI_Responses"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit?usp=drivesdk",
"cachedResultName": "customer_support_knowledge_base"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "50ded0f7-2513-4515-8843-e24cb50c89ae",
"name": "\u26a0\ufe0f Error Handling Info",
"type": "n8n-nodes-base.stickyNote",
"position": [
3100,
980
],
"parameters": {
"width": 300,
"height": 280,
"content": "## \ud83d\udea8 Error Handling\n\nThis section handles any errors that occur during the workflow execution and notifies the admin team.\n\n**Features:**\n- Captures all workflow errors\n- Sends notifications to admin\n- Logs errors for debugging\n- Provides fallback responses"
},
"typeVersion": 1
},
{
"id": "8634105f-1844-4e58-97f3-07697d86ac48",
"name": "\ud83d\udea8 Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"position": [
2760,
1300
],
"parameters": {},
"typeVersion": 1
},
{
"id": "807781dc-c1ac-4bca-b298-420a3a3d5c2c",
"name": "\ud83d\udce2 Notify Admin of Error",
"type": "n8n-nodes-base.httpRequest",
"position": [
3020,
1300
],
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "\ud83d\udea8 Customer Support AI Error Alert\n\nWorkflow: Smart Customer Support AI\nError: {{ $json.error.message }}\nNode: {{ $json.error.node.name }}\nTime: {{ new Date().toISOString() }}\n\nPlease check the workflow execution for details."
}
]
}
},
"typeVersion": 4.2
},
{
"id": "4581974a-7e7c-4b61-b5c7-a6023ef931d0",
"name": "Gmail Escalation Logger",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
2300,
920
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1478316494,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit#gid=1478316494",
"cachedResultName": "Customer_Inquiries"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit?usp=drivesdk",
"cachedResultName": "customer_support_knowledge_base"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "d9f13fc4-0a68-4bee-a36f-67e779bef7fe",
"name": "knowledge base",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
2180,
1000
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit#gid=0",
"cachedResultName": "Knowledge_Base"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit?usp=drivesdk",
"cachedResultName": "customer_support_knowledge_base"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "dfaba1db-fc45-4c09-b83d-2413086f52d8",
"name": "knowledge base1",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
2240,
1440
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit#gid=0",
"cachedResultName": "Knowledge_Base"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit?usp=drivesdk",
"cachedResultName": "customer_support_knowledge_base"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "a79e16e6-409a-47b1-a7f9-60de7aac1700",
"name": "Telegram Escalation Logger",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
2420,
1400
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1478316494,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit#gid=1478316494",
"cachedResultName": "Customer_Inquiries"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rEZ1A0Gd5ejT_b2F5tcYy9Xk4i0JvTrjss_oolf6WD8/edit?usp=drivesdk",
"cachedResultName": "customer_support_knowledge_base"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "791294ac-b7d5-45f8-951a-7146057b58f7",
"connections": {
"knowledge base": {
"ai_tool": [
[
{
"node": "\ud83e\udd16 Gmail AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"knowledge base1": {
"ai_tool": [
[
{
"node": "\ud83e\udd16 Telegram AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"\ud83e\udde0 Gmail Memory": {
"ai_memory": [
[
{
"node": "\ud83e\udd16 Gmail AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"\ud83d\udea8 Error Trigger": {
"main": [
[
{
"node": "\ud83d\udce2 Notify Admin of Error",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udd16 Gmail AI Agent": {
"main": [
[
{
"node": "\ud83d\udce7 Send Gmail Reply",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udde0 Telegram Memory": {
"ai_memory": [
[
{
"node": "\ud83e\udd16 Telegram AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"\ud83d\udce7 Send Gmail Reply": {
"main": [
[
{
"node": "\u2705 Mark Gmail as Read",
"type": "main",
"index": 0
},
{
"node": "\ud83d\udcca Log Gmail Interaction",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udd16 Telegram AI Agent": {
"main": [
[
{
"node": "\ud83d\udcac Send Telegram Reply",
"type": "main",
"index": 0
}
]
]
},
"Gmail Escalation Logger": {
"ai_tool": [
[
{
"node": "\ud83e\udd16 Gmail AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"\ud83d\udcac Send Telegram Reply": {
"main": [
[
{
"node": "\ud83d\udcca Log Telegram Interaction",
"type": "main",
"index": 0
}
]
]
},
"Telegram Escalation Logger": {
"ai_tool": [
[
{
"node": "\ud83e\udd16 Telegram AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"\ud83d\udccb Process Gmail Message": {
"main": [
[
{
"node": "\ud83e\udd16 Gmail AI Agent",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udccb Process Telegram Message": {
"main": [
[
{
"node": "\ud83e\udd16 Telegram AI Agent",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udde0 OpenAI Chat Model - Gmail": {
"ai_languageModel": [
[
{
"node": "\ud83e\udd16 Gmail AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"\ud83e\udde0 OpenAI Chat Model - Telegram": {
"ai_languageModel": [
[
{
"node": "\ud83e\udd16 Telegram AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"\ud83d\udce7 Gmail Customer Inquiry Trigger": {
"main": [
[
{
"node": "\ud83d\udccb Process Gmail Message",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udcac Telegram Customer Message Trigger": {
"main": [
[
{
"node": "\ud83d\udccb Process Telegram Message",
"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.
gmailOAuth2googleSheetsOAuth2ApiopenAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is perfect for: Small to medium businesses looking to automate customer support E-commerce stores handling order inquiries and customer questions SaaS companies providing technical support to users Service providers managing appointment bookings and general…
Source: https://n8n.io/workflows/4474/ — 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.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
This project is a template for building a complete academic virtual assistant using n8n. It connects to Telegram, answers frequently asked questions by querying MongoDB, keeps the community informed a
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
ITfest. Uses telegramTrigger, telegram, textClassifier, agent. Event-driven trigger; 70 nodes.
Jarvis is a powerful multi-agent productivity assistant built in n8n. It works directly from Telegram and can understand both text messages and voice notes.