Smart Email Classification
Dies ist ein Ticket Management, Multimodal AI-Bereich Automatisierungsworkflow mit 26 Nodes. Hauptsächlich werden Gmail, WhatsApp, GmailTrigger, OpenAi, LmChatOpenAi und andere Nodes verwendet. Automatisches Gmail-Kategorisieren und Antworten mit GPT und WhatsApp-Erinnerungen
- •Google-Konto + Gmail API-Anmeldedaten
- •OpenAI API Key
Verwendete Nodes (26)
Kategorie
{
"id": "j52UGeF9akxXBKRK",
"meta": {
"instanceId": "41a93cc6f329d5755684ac69c9a86d5c75d7dc780eea0b60d82055e6149e455f",
"templateCredsSetupCompleted": true
},
"name": "Intelligent Email Classification",
"tags": [],
"nodes": [
{
"id": "9ae4ac61-98dd-425d-8ec3-85b0ad0da7c5",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-1184,
-496
],
"parameters": {
"filters": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 1.2
},
{
"id": "a1a5959c-52fa-417c-8024-1512909e9fae",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-896,
-240
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "LNuj9b67Zq2tZww5",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "7d84dcde-f724-4b08-88db-c463791f76ca",
"name": "E-Mail mit hoher Priorität",
"type": "n8n-nodes-base.gmail",
"position": [
-224,
-1024
],
"webhookId": "6e9c3f6d-f508-4668-97f9-704a5173e8fa",
"parameters": {
"labelIds": [
"Label_7974018348016773078"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "aaac9866-4d4b-4c88-97c7-a8d15b20837d",
"name": "Kundensupport-E-Mail",
"type": "n8n-nodes-base.gmail",
"position": [
-208,
-752
],
"webhookId": "6e9c3f6d-f508-4668-97f9-704a5173e8fa",
"parameters": {
"labelIds": [
"Label_7432353852807721490"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "0f5b6666-002a-4090-94ad-dfb5f6e8247d",
"name": "Werbe-E-Mail",
"type": "n8n-nodes-base.gmail",
"position": [
-208,
-528
],
"webhookId": "6e9c3f6d-f508-4668-97f9-704a5173e8fa",
"parameters": {
"labelIds": [
"Label_7974018348016773078"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "9a886ba2-5721-4fdc-ad4e-7770803d61a6",
"name": "Finanz-/Abrechnungs-E-Mail",
"type": "n8n-nodes-base.gmail",
"position": [
-96,
-208
],
"webhookId": "6e9c3f6d-f508-4668-97f9-704a5173e8fa",
"parameters": {
"labelIds": [
"Label_487984775758613877"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "45f1546d-b619-42f5-a4ce-ee3bc3309886",
"name": "Zufällige (Allgemeine/Sonstige) E-Mail",
"type": "n8n-nodes-base.gmail",
"position": [
-240,
64
],
"webhookId": "6e9c3f6d-f508-4668-97f9-704a5173e8fa",
"parameters": {
"labelIds": [
"Label_4854753170056793401"
],
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "a0862448-5ccf-45a7-9522-d42e902ab00c",
"name": "E-Mail-Klassifizierer",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
-992,
-560
],
"parameters": {
"options": {},
"inputText": "={{ $json.snippet }}",
"categories": {
"categories": [
{
"category": "High Priority",
"description": "Definition: Emails requiring immediate attention or action, often time-sensitive or involving urgent issues. Examples: System outages, legal alerts, executive requests, critical deadlines, crisis management."
},
{
"category": "Customer Support",
"description": "Definition: Emails related to addressing customer issues, questions, feedback, or service requests. Examples: Complaint resolution, troubleshooting help, account inquiries, service feedback."
},
{
"category": "Promotion",
"description": "Definition: Marketing or sales emails designed to promote a product, service, event, or offer. Examples: Newsletters, discounts, product launches, affiliate promotions."
},
{
"category": "Finance/Billing",
"description": "Definition: Emails involving monetary matters, budgets, transactions, invoices, or financial reporting. Examples: Invoices, salary slips, payment confirmations, expense reports, tax documents."
},
{
"category": "Random (General/Other)",
"description": "Definition: Emails that don’t clearly fall into the above categories — often personal, spammy, or unrelated to business operations. Examples: Internal memos without urgency, jokes, general announcements, social invites."
}
]
}
},
"typeVersion": 1.1
},
{
"id": "73d29ab2-c4a7-4ad0-8082-87df29ab1a63",
"name": "Erstellen eines Entwurfs",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
0,
-1024
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are an Executive Assistant responsible for drafting accurate, clear, and professional responses to urgent and high-priority inquiries.\n\nHere is the incoming email you are responding to:\n{{ $('Gmail Trigger').item.json.snippet }}\n\nYour task:\n1. Read and understand the email content carefully.\n2. Identify the main issue, request, or concern.\n3. Provide a concise and effective response that directly addresses the matter.\n4. Maintain a professional and respectful tone.\n5. If additional action is needed, include a short next-steps section in the reply.\n\nOutput format (return exactly in this structure):\nSubject: [A short and relevant subject line]\nMessage: [Your full, well-formatted email reply]\n"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "LNuj9b67Zq2tZww5",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "e062bfb5-9e68-461c-9064-13896f1d1986",
"name": "E-Mail-Entwurf",
"type": "n8n-nodes-base.gmail",
"position": [
400,
-1024
],
"webhookId": "49848a5a-a4de-4b3a-9a10-235c0b33ab71",
"parameters": {
"message": "={{ $json.message.content.Message }}",
"options": {},
"subject": "={{ $json.message.content.Subject }}",
"resource": "draft"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "bff31bfe-2dfe-4cca-ae8c-442c840c5497",
"name": "E-Mail erstellen",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
16,
-752
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are an Executive Assistant responsible for drafting professional, accurate, and empathetic responses to all customer support inquiries.\n\nHere is the incoming email you are responding to:\n{{ $('Gmail Trigger').item.json.snippet }}\n\nYour task:\n1. Read and understand the customer’s inquiry fully.\n2. Identify the customer's name from the email content, and address them by name at the start of the reply.\n3. Provide a clear, concise, and helpful response that answers all questions or concerns raised in the email.\n4. Maintain a polite, friendly, and professional tone throughout.\n5. Avoid unnecessary filler words; focus on solving the customer's issue efficiently.\n6. End the email with:\nBest regards,\n[YOUR_NAME]\n\n(Replace [YOUR_NAME] with the actual sender’s name configured in the workflow.)\n\n"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "LNuj9b67Zq2tZww5",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "953f9d91-dc32-493b-8e0f-ed3447874396",
"name": "Automatische Antwort",
"type": "n8n-nodes-base.gmail",
"position": [
416,
-752
],
"webhookId": "b1cc850c-209d-4c6a-89d2-8517849c091d",
"parameters": {
"message": "={{ $json.message.content }}",
"options": {},
"emailType": "text",
"messageId": "={{ $('Gmail Trigger').item.json.id }}",
"operation": "reply"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "0685ef61-fa4f-46a1-960f-822611e55cde",
"name": "Finanzabteilung",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
128,
-208
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are an Executive Assistant responsible for handling finance-related inquiries and preparing concise summaries for the finance department.\n\nHere is the incoming email you are responding to:\n{{ $('Gmail Trigger').item.json.snippet }}\n\nYour task:\n1. Read and fully understand the email content.\n2. Identify the key financial topic or request (e.g., invoice, payment confirmation, budget query, expense report, tax document).\n3. Summarize the essential details clearly and accurately.\n4. Keep the summary professional and free of unnecessary information.\n5. Ensure the tone remains formal and business-appropriate.\n\nOutput format (return exactly in this structure):\nSubject: [A short and relevant subject line]\nText: [A clear and concise summary of the finance-related email]\n"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "LNuj9b67Zq2tZww5",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "c8997eff-cc00-4dc6-9d92-378bc2d0ba64",
"name": "Werbeaktionen zusammenfassen",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
16,
-528
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are an Executive Assistant responsible for summarizing all incoming promotional emails.\n\nHere is the incoming email you are responding to:\n{{ $('Gmail Trigger').item.json.snippet }}\n\nYour task:\n1. Read and understand the promotional email content.\n2. Identify the key offer, product, service, event, or deal being promoted.\n3. Include important details such as:\n - Offer type (discount, launch, announcement, etc.)\n - Expiry date or deadline (if mentioned)\n - Any special conditions or requirements\n4. Exclude unnecessary or repetitive marketing language.\n5. Keep the summary clear, concise, and actionable.\n\nOutput format:\nSummary: [A short, well-structured summary of the promotional email]\n"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "LNuj9b67Zq2tZww5",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "90ea2e06-083e-45ec-bd41-cbd59ce650fa",
"name": "Warnung bei hoher Priorität",
"type": "n8n-nodes-base.whatsApp",
"position": [
624,
-1024
],
"webhookId": "6a129da8-0dbf-4bd7-a1ad-8af3f54368ec",
"parameters": {
"textBody": "=High priority email Alert!!!\n{{ $('Gmail Trigger').item.json.snippet }}\n\nI have created a Draft of the replying email:\n{{ $('Creating a Draft').item.json.message.content.Message }}",
"operation": "send",
"phoneNumberId": "=",
"additionalFields": {},
"recipientPhoneNumber": "[YOUR_WHATSAPP_NUMBER]"
},
"credentials": {
"whatsAppApi": {
"id": "FhsL97tKAVtEydZF",
"name": "WhatsApp account"
}
},
"typeVersion": 1
},
{
"id": "ff9a200a-90bf-49b7-8b00-acdbaf320ced",
"name": "Bestätigung",
"type": "n8n-nodes-base.whatsApp",
"position": [
640,
-752
],
"webhookId": "6a129da8-0dbf-4bd7-a1ad-8af3f54368ec",
"parameters": {
"textBody": "=Customer Support Related Inquiries\n{{ $('Gmail Trigger').item.json.snippet }}\n\nReplied email:{{ $('Create Email').item.json.message.content }}",
"operation": "send",
"phoneNumberId": "=",
"additionalFields": {},
"recipientPhoneNumber": "[YOUR_WHATSAPP_NUMBER]"
},
"credentials": {
"whatsAppApi": {
"id": "FhsL97tKAVtEydZF",
"name": "WhatsApp account"
}
},
"typeVersion": 1
},
{
"id": "f912992f-ddbf-48d7-a9dc-2115c9f0f910",
"name": "Werbliche Warnung",
"type": "n8n-nodes-base.whatsApp",
"position": [
416,
-528
],
"webhookId": "6a129da8-0dbf-4bd7-a1ad-8af3f54368ec",
"parameters": {
"textBody": "=Promotional related Email Trigger\n{{ $('Gmail Trigger').item.json.snippet }}\n\n",
"operation": "send",
"phoneNumberId": "=",
"additionalFields": {},
"recipientPhoneNumber": "[YOUR_WHATSAPP_NUMBER]"
},
"credentials": {
"whatsAppApi": {
"id": "FhsL97tKAVtEydZF",
"name": "WhatsApp account"
}
},
"typeVersion": 1
},
{
"id": "1c4b6a73-c41c-41b4-ba3b-c3a8b8064181",
"name": "Finanzwarnung",
"type": "n8n-nodes-base.whatsApp",
"position": [
752,
-208
],
"webhookId": "6a129da8-0dbf-4bd7-a1ad-8af3f54368ec",
"parameters": {
"textBody": "= You received a Finance related inquires:{{ $('Gmail Trigger').item.json.snippet }}\n\nI have notified this to your finance department with this Reply email:{{ $('Finance Department').item.json.message.content.Email }}",
"operation": "send",
"phoneNumberId": "=",
"additionalFields": {},
"recipientPhoneNumber": "[YOUR_WHATSAPP_NUMBER]"
},
"credentials": {
"whatsAppApi": {
"id": "FhsL97tKAVtEydZF",
"name": "WhatsApp account"
}
},
"typeVersion": 1
},
{
"id": "f8c045af-ddd7-496a-9dea-c187661c2857",
"name": "Notizzettel",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1264,
-640
],
"parameters": {
"color": 4,
"height": 352,
"content": "Starts the workflow when a new email is received in Gmail.\nEnsure you've set up Gmail credentials and appropriate filters if needed."
},
"typeVersion": 1
},
{
"id": "677541d5-fab0-4afa-bf22-62ee20aef21d",
"name": "Notizzettel1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1008,
-816
],
"parameters": {
"width": 320,
"height": 688,
"content": "Uses OpenAI to classify the incoming email into one of 5 categories:\n\nHigh Priority\n\nCustomer Support\n\nPromotion\n\nFinance/Billing\n\nRandom/General"
},
"typeVersion": 1
},
{
"id": "e0d6aa89-5dd9-4c3f-9299-94b41541b632",
"name": "Notizzettel2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-1136
],
"parameters": {
"color": 3,
"width": 1264,
"height": 272,
"content": "Adds \"High Priority\" label in Gmail\n\nGenerates a draft email using OpenAI\n\nSends a WhatsApp alert for urgent attention"
},
"typeVersion": 1
},
{
"id": "18b64002-7d5a-4ab7-9367-33891861eadb",
"name": "Notizzettel3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-848
],
"parameters": {
"color": 2,
"width": 1280,
"height": 256,
"content": "Adds \"Customer Support\" label in Gmail\n\nGenerates a quick auto-reply using OpenAI\n\nSends WhatsApp confirmation for support interaction"
},
"typeVersion": 1
},
{
"id": "2671b41b-5b64-443c-9c59-a885576de663",
"name": "Notizzettel4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-576
],
"parameters": {
"color": 5,
"width": 1296,
"height": 240,
"content": "Labels the email as \"Promotion\"\n\nSummarizes the email content using OpenAI\n\nSends a WhatsApp promotional digest alert"
},
"typeVersion": 1
},
{
"id": "5b73ffab-3eeb-4c3c-9f1b-5075fb632318",
"name": "Notizzettel5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-320
],
"parameters": {
"color": 7,
"width": 1264,
"height": 304,
"content": "Labels the email as \"Finance/Billing\"\n\nCreates a summary using OpenAI\n\nSends the summary to the Finance Department via Gmail\n\nTriggers a Finance Alert over WhatsApp"
},
"typeVersion": 1
},
{
"id": "2ed87858-1ea0-40c5-bf7c-d10819df49e1",
"name": "Notizzettel6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-48
],
"parameters": {
"color": 4,
"width": 432,
"height": 288,
"content": "Labels unclassified emails as “Random”\n\nNo further automation occurs, but emails are still organized"
},
"typeVersion": 1
},
{
"id": "fd867ca9-939b-457d-b673-c01d03e9a22d",
"name": "An Finanzabteilung senden",
"type": "n8n-nodes-base.gmail",
"position": [
528,
-208
],
"webhookId": "1dcded01-5b09-4e84-b49c-dc617c267fe4",
"parameters": {
"sendTo": "[YOUR_GMAIL_ADDRESS]",
"message": "={{ $json.message.content.Text }}",
"options": {},
"subject": "={{ $json.message.content.Subject }}",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "52mNI7KwytiCFBmo",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "c9891c26-481f-41b8-a0f2-3d1938671fc6",
"connections": {
"953f9d91-dc32-493b-8e0f-ed3447874396": {
"main": [
[
{
"node": "ff9a200a-90bf-49b7-8b00-acdbaf320ced",
"type": "main",
"index": 0
}
]
]
},
"e062bfb5-9e68-461c-9064-13896f1d1986": {
"main": [
[
{
"node": "90ea2e06-083e-45ec-bd41-cbd59ce650fa",
"type": "main",
"index": 0
}
]
]
},
"bff31bfe-2dfe-4cca-ae8c-442c840c5497": {
"main": [
[
{
"node": "953f9d91-dc32-493b-8e0f-ed3447874396",
"type": "main",
"index": 0
}
]
]
},
"9ae4ac61-98dd-425d-8ec3-85b0ad0da7c5": {
"main": [
[
{
"node": "a0862448-5ccf-45a7-9522-d42e902ab00c",
"type": "main",
"index": 0
}
]
]
},
"0f5b6666-002a-4090-94ad-dfb5f6e8247d": {
"main": [
[
{
"node": "c8997eff-cc00-4dc6-9d92-378bc2d0ba64",
"type": "main",
"index": 0
}
]
]
},
"73d29ab2-c4a7-4ad0-8082-87df29ab1a63": {
"main": [
[
{
"node": "e062bfb5-9e68-461c-9064-13896f1d1986",
"type": "main",
"index": 0
}
]
]
},
"a0862448-5ccf-45a7-9522-d42e902ab00c": {
"main": [
[
{
"node": "7d84dcde-f724-4b08-88db-c463791f76ca",
"type": "main",
"index": 0
}
],
[
{
"node": "aaac9866-4d4b-4c88-97c7-a8d15b20837d",
"type": "main",
"index": 0
}
],
[
{
"node": "0f5b6666-002a-4090-94ad-dfb5f6e8247d",
"type": "main",
"index": 0
}
],
[
{
"node": "9a886ba2-5721-4fdc-ad4e-7770803d61a6",
"type": "main",
"index": 0
}
],
[
{
"node": "45f1546d-b619-42f5-a4ce-ee3bc3309886",
"type": "main",
"index": 0
}
]
]
},
"a1a5959c-52fa-417c-8024-1512909e9fae": {
"ai_languageModel": [
[
{
"node": "a0862448-5ccf-45a7-9522-d42e902ab00c",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"0685ef61-fa4f-46a1-960f-822611e55cde": {
"main": [
[
{
"node": "fd867ca9-939b-457d-b673-c01d03e9a22d",
"type": "main",
"index": 0
}
]
]
},
"7d84dcde-f724-4b08-88db-c463791f76ca": {
"main": [
[
{
"node": "73d29ab2-c4a7-4ad0-8082-87df29ab1a63",
"type": "main",
"index": 0
}
]
]
},
"c8997eff-cc00-4dc6-9d92-378bc2d0ba64": {
"main": [
[
{
"node": "f912992f-ddbf-48d7-a9dc-2115c9f0f910",
"type": "main",
"index": 0
}
]
]
},
"9a886ba2-5721-4fdc-ad4e-7770803d61a6": {
"main": [
[
{
"node": "0685ef61-fa4f-46a1-960f-822611e55cde",
"type": "main",
"index": 0
}
]
]
},
"aaac9866-4d4b-4c88-97c7-a8d15b20837d": {
"main": [
[
{
"node": "bff31bfe-2dfe-4cca-ae8c-442c840c5497",
"type": "main",
"index": 0
}
]
]
},
"fd867ca9-939b-457d-b673-c01d03e9a22d": {
"main": [
[
{
"node": "1c4b6a73-c41c-41b4-ba3b-c3a8b8064181",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Experte - Ticketverwaltung, Multimodales KI
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Nabin Bhandari
@knabinbhandariDiesen Workflow teilen