Sistema de clasificación de correo y respuesta automática impulsado por IA
Este es unTicket Management, AI Summarizationflujo de automatización del dominio deautomatización que contiene 24 nodos.Utiliza principalmente nodos como Agent, MicrosoftOutlook, LmChatOpenAi, MicrosoftOutlookTrigger, TextClassifier. Clasificar correos y responder automáticamente usando Outlook y GPT-4
- •Clave de API de OpenAI
Nodos utilizados (24)
Categoría
{
"id": "Yn7tmZK650FOKDSc",
"meta": {
"instanceId": "25e77c0c6022d4bb0bf1d4755e6d167b4f61a12eba4f980e0349847ef576722f",
"templateCredsSetupCompleted": true
},
"name": "AI-Powered Email Classification and Auto-Reply System",
"tags": [],
"nodes": [
{
"id": "c1f2aa2b-570c-4d6b-b0c8-13f9cea4bbf7",
"name": "Microsoft Outlook Trigger",
"type": "n8n-nodes-base.microsoftOutlookTrigger",
"position": [
-432,
976
],
"parameters": {
"filters": {},
"options": {
"downloadAttachments": true
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"typeVersion": 1
},
{
"id": "e3dfd5b1-89cd-41de-9d4a-4d020258de7b",
"name": "Modelo de chat OpenAI - Classifier",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-16,
1104
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "6b25f516-0620-4202-95ea-af50d7b3ab43",
"name": "Reply to Urgent Correo electrónico",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1056,
288
],
"webhookId": "3caba703-2528-468e-a341-438501e066f6",
"parameters": {
"message": "={{ $json.output }}",
"options": {},
"messageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Microsoft Outlook Trigger').item.json.id }}"
},
"operation": "reply",
"additionalFields": {
"replyTo": "={{ $('Microsoft Outlook Trigger').item.json.from }}"
},
"replyToSenderOnly": true
},
"typeVersion": 2
},
{
"id": "e4c42889-28d6-4308-ac59-965972450ef9",
"name": "AI Email Classifier",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
48,
944
],
"parameters": {
"options": {
"systemPromptTemplate": "=# Role\nYou are an expert in email classification based on importance and urgency.\n\n# Context\nYou will receive email bodies that you will analyze to classify them into a specific category.\n\nYou have three categories available:\n\n1/ Urgent\n\n2/ Important\n\n3/ Not Important\n\n# Instructions\n\nTo perfectly define the right category for each email, here are some guidelines:\n\n1/ \"Urgent\" Category:\nClassify all emails where there is a stated urgency, an important deadline approaching in the short term, where case management is a priority, and where the information, request, or inquiry is genuinely urgent.\n\n2/ \"Important\" Category:\nClassify all emails where the request, action to be taken, or case/client processing remains important without being an absolute emergency and where the deadline is short to medium term. This is a somewhat tricky category because the line between \"Urgent\" and \"Important\" can quickly become blurred depending on the words used. Pay close attention to correctly discern and precisely judge whether the email corresponds to an emergency or whether it simply remains an \"Important\" email without needing to rush to process it.\n\n3/ \"Not Important\" Category:\nClassify all emails where the importance is much lower than the other types of emails described in the other categories. These are still professional emails but they target a more distant deadline, are not important for this week, do not deal with an important case/client, or are slightly more secondary.\n\n# Important Information\n\nToday's date: {{ $today }}"
},
"inputText": "={{ $json.bodyPreview }}",
"categories": {
"categories": [
{
"category": "Urgent",
"description": "Emails that are urgent and require immediate attention"
},
{
"category": "Important",
"description": "Emails that are important but not urgent"
},
{
"category": "Not Important",
"description": "Emails that are neither important nor urgent"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "107fdc73-595c-4f16-969a-3fadcbb62441",
"name": "Generate Urgent Reply",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
624,
272
],
"parameters": {
"text": "=Reply to this email:\n{{ $('Microsoft Outlook Trigger').item.json.bodyPreview }}",
"options": {
"systemMessage": "=# Role\nYou are an expert in writing email replies.\n\n# Instructions\n\nYou write in the first person.\n\nYou write briefly and precisely.\n\nYou are polite and use formal language with the person who sent the email.\n\nYou indicate that the file, question, or subject will be processed quickly given its importance (close date, meeting request, importance of a case, etc.).\n\nYou don't always write the same email. The response must seem human and natural.\n\nYou always end your email with polite closing formulas (e.g., \"Best regards\", \"Kind regards\", \"Sincerely\", etc.).\n\n# Important Information\n\nToday's date: {{ $today }}"
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "ab884171-cf1f-446b-a22d-7af727d525d1",
"name": "Modelo de chat OpenAI - Urgent",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
560,
432
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "5d106834-c16c-44da-9dad-c2823475bad1",
"name": "Reply to Important Correo electrónico",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1040,
912
],
"webhookId": "3caba703-2528-468e-a341-438501e066f6",
"parameters": {
"message": "={{ $json.output }}",
"options": {},
"messageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Microsoft Outlook Trigger').item.json.id }}"
},
"operation": "reply",
"additionalFields": {
"replyTo": "={{ $('Microsoft Outlook Trigger').item.json.from }}"
},
"replyToSenderOnly": true
},
"typeVersion": 2
},
{
"id": "744080bc-1296-4c1e-a0aa-3bd6aed8db0f",
"name": "Generate Important Reply",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
640,
880
],
"parameters": {
"text": "=Write the reply email for this message:\n\n{{ $item(\"0\").$node[\"Microsoft Outlook Trigger\"].json[\"bodyPreview\"] }}",
"options": {
"systemMessage": "=# Role\nYou are an expert in writing email replies.\n\nThe email is transmitted to you in the user prompt.\n\n# Instructions\n\nYou write in the first person.\n\nYou write briefly and precisely.\n\nYou are polite and use formal language with the person who sent the email.\n\nYou indicate that the file, question, or subject will be processed without showing that it's urgent or indicating that it's being put on the back burner or will be processed later.\n\nYou don't always write the same email. The response must seem human and natural.\n\nYou always end your email with polite closing formulas (e.g., \"Best regards\", \"Kind regards\", \"Sincerely\", etc.).\n\n# Important Information\n\nToday's date: {{ $today }}"
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "36c2d4b3-9934-4352-a945-5a545ee94e89",
"name": "Modelo de chat OpenAI - Important",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
496,
1008
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "227f3b68-24b8-49ac-a4c5-5df5583ffb3c",
"name": "Move to Not Important Folder",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1504,
1344
],
"webhookId": "91e15089-2724-4a8e-8685-2b269143dab6",
"parameters": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "AQMkADAwATM0MDAAMi05OQA0Ni0wMAA2MS0wMAItMDAKAC4AAAO1-Epgjxr1TaaZjmLt5cKwAQBFZJ1Tub2VQKCvIGXV0RM_AAAADQXuOQAAAA==",
"cachedResultUrl": "https://outlook.office365.com/mail/AQMkADAwATM0MDAAMi05OQA0Ni0wMAA2MS0wMAItMDAKAC4AAAO1%2FEpgjxr1TaaZjmLt5cKwAQBFZJ1Tub2VQKCvIGXV0RM_AAAADQXuOQAAAA%3D%3D",
"cachedResultName": "Not Important"
},
"messageId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"operation": "move"
},
"typeVersion": 2
},
{
"id": "611de7c4-4b54-454a-a7f4-8a1c045d42ed",
"name": "Reply to Not Important Correo electrónico",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1088,
1456
],
"webhookId": "3caba703-2528-468e-a341-438501e066f6",
"parameters": {
"message": "={{ $json.output }}",
"options": {},
"messageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Microsoft Outlook Trigger').item.json.id }}"
},
"operation": "reply",
"additionalFields": {
"replyTo": "={{ $('Microsoft Outlook Trigger').item.json.from }}"
},
"replyToSenderOnly": true
},
"typeVersion": 2
},
{
"id": "b9328e8e-75f9-479e-9008-fce7f7edfdff",
"name": "Generate Standard Reply",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
672,
1488
],
"parameters": {
"text": "=Write the reply to this email:\n{{ $item(\"0\").$node[\"Microsoft Outlook Trigger\"].json[\"bodyPreview\"] }}",
"options": {
"systemMessage": "=# Role\nYou are an expert in writing email replies.\n\nThe email is transmitted to you in the user prompt.\n\n# Instructions\n\nYou write in the first person.\n\nYou write briefly and precisely.\n\nYou are polite and use formal language with the person who sent the email.\n\nYou indicate that the file, question, or subject will be processed within a relatively short timeframe.\n\nYou never specify that the subject/file/etc. is not important.\n\nYou make it clear that everything will be processed in due time.\n\nYou don't always write the same email. The response must seem human and natural.\n\nYou always end your email with polite closing formulas (e.g., \"Best regards\", \"Kind regards\", \"Sincerely\", etc.).\n\n# Important Information\n\nToday's date: {{ $today }}"
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "7f5ecf8b-f7f2-454e-9c87-9735eec112a1",
"name": "Modelo de chat OpenAI - Standard",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
480,
1584
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "5231d92d-d9c2-4fbc-a10b-4080a9343c9d",
"name": "Move to Urgent Folder",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1552,
400
],
"webhookId": "1e0359d8-469f-491e-8f43-aa5556c91782",
"parameters": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "AQMkADAwATM0MDAAMi05OQA0Ni0wMAA2MS0wMAItMDAKAC4AAAO1-Epgjxr1TaaZjmLt5cKwAQBFZJ1Tub2VQKCvIGXV0RM_AAAADQXuNwAAAA==",
"cachedResultUrl": "https://outlook.office365.com/mail/AQMkADAwATM0MDAAMi05OQA0Ni0wMAA2MS0wMAItMDAKAC4AAAO1%2FEpgjxr1TaaZjmLt5cKwAQBFZJ1Tub2VQKCvIGXV0RM_AAAADQXuNwAAAA%3D%3D",
"cachedResultName": "URGENT"
},
"messageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('AI Email Classifier').item.json.id }}"
},
"operation": "move"
},
"typeVersion": 2
},
{
"id": "b944ef3f-560f-4745-8583-573914a8df1e",
"name": "Move to Important Folder",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1536,
880
],
"webhookId": "1e0359d8-469f-491e-8f43-aa5556c91782",
"parameters": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "AQMkADAwATM0MDAAMi05OQA0Ni0wMAA2MS0wMAItMDAKAC4AAAO1-Epgjxr1TaaZjmLt5cKwAQBFZJ1Tub2VQKCvIGXV0RM_AAAADQXuOAAAAA==",
"cachedResultUrl": "https://outlook.office365.com/mail/AQMkADAwATM0MDAAMi05OQA0Ni0wMAA2MS0wMAItMDAKAC4AAAO1%2FEpgjxr1TaaZjmLt5cKwAQBFZJ1Tub2VQKCvIGXV0RM_AAAADQXuOAAAAA%3D%3D",
"cachedResultName": "Important"
},
"messageId": {
"__rl": true,
"mode": "id",
"value": "={{ $('AI Email Classifier').item.json.id }}"
},
"operation": "move"
},
"typeVersion": 2
},
{
"id": "8ecd8b0b-91e1-4e5a-9647-537eb08d6506",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1216,
240
],
"parameters": {
"width": 480,
"height": 780,
"content": "## AI-Powered Email Classification and Auto-Reply System\n\n### Who's it for\nProfessionals and teams managing high email volumes who need automatic email triage and responses.\n\n### What it does\nThis workflow monitors your Outlook inbox and uses AI to classify emails into three urgency levels: Urgent, Important, or Not Important. It automatically generates personalized replies and organizes emails into folders.\n\n### How it works\nNew emails trigger AI classification based on urgency and deadlines. The system then generates an appropriate reply using GPT-4 and moves the email to the corresponding folder.\n\n### Requirements\n- Microsoft Outlook account with API access\n- OpenAI API key (GPT-4 access)\n- Three Outlook folders: URGENT, Important, Not Important\n\n### Setup\nConnect your Outlook credentials, add your OpenAI API key to all Chat Model nodes, update folder IDs in the Move nodes, and customize the AI prompts to match your tone.\n\n### Customization\nAdjust classification criteria, modify reply tone and style, add more categories, or integrate with other tools like Slack or CRM systems."
},
"typeVersion": 1
},
{
"id": "217734d2-91cc-4041-87ac-0602b251b5be",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-576,
528
],
"parameters": {
"color": 7,
"width": 380,
"height": 768,
"content": "## 1. Email Trigger\n\nMonitors your Microsoft Outlook inbox and checks for new emails every minute. Automatically downloads attachments and captures all email metadata.\n\n**Configuration:**\n- Poll frequency: Every minute\n- Filters: None (processes all emails)\n- Attachments: Enabled\n\nEmail data flows to the AI classifier for analysis."
},
"typeVersion": 1
},
{
"id": "70d4589a-7e80-471b-95b9-95947667231e",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
528
],
"parameters": {
"color": 7,
"width": 420,
"height": 772,
"content": "## 2. AI Email Classification\n\nAnalyzes email content and classifies into three categories based on urgency, deadlines, and importance.\n\n**Categories:**\n- **Urgent:** Immediate attention, close deadlines\n- **Important:** Needs attention, not time-sensitive\n- **Not Important:** Standard correspondence\n\nUses GPT-4 mini for fast classification. Considers today's date for deadline calculations and looks for urgency indicators like deadline language, client importance, and time-sensitive items.\n\nRoutes to appropriate reply generation based on classification."
},
"typeVersion": 1
},
{
"id": "c95221f7-d0cd-43ff-9e21-de799663b9ff",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
448,
-16
],
"parameters": {
"color": 7,
"width": 804,
"height": 552,
"content": "## 3A. Urgent Email Path\n\nGenerates immediate acknowledgment with urgent tone, emphasizing quick response commitment. References specific deadlines while maintaining natural variation.\n\n**Reply style:**\n- First person, brief and direct\n- Formal language\n- Commits to rapid processing\n\nAutomatically sends reply to sender and moves email to URGENT folder for priority follow-up."
},
"typeVersion": 1
},
{
"id": "91c7df05-e1c1-4a9e-a5c6-d2f6880ecd69",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
448,
592
],
"parameters": {
"color": 7,
"width": 804,
"height": 536,
"content": "## 3B. Important Email Path\n\nCreates balanced acknowledgment indicating timely processing without rushed language. Professional and measured tone.\n\n**Reply style:**\n- First person, concise yet complete\n- Formal language\n- Neutral timeline commitment\n\nSends reply automatically and moves email to Important folder for standard follow-up."
},
"typeVersion": 1
},
{
"id": "f69cb8b1-a631-47ce-92bb-8bfce1a560dc",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
448,
1184
],
"parameters": {
"color": 7,
"width": 804,
"height": 528,
"content": "## 3C. Not Important Email Path\n\nGenerates courteous acknowledgment with reasonable timeline expectations. Never implies low priority explicitly while maintaining professionalism.\n\n**Reply style:**\n- First person, brief and polite\n- Formal language\n- \"In due time\" messaging\n\nSends reply automatically and moves email to Not Important folder for later review."
},
"typeVersion": 1
},
{
"id": "00dd4800-5592-4a09-ad18-a0aecb174232",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1344,
-16
],
"parameters": {
"color": 7,
"width": 472,
"height": 1736,
"content": "## 4. Email Organization\n\nMoves each processed email to its designated folder based on classification.\n\n**Folder routing:**\n- Urgent → URGENT folder\n- Important → Important folder\n- Not Important → Not Important folder\n\nProvides clean inbox, easy priority identification, and efficient email management.\n\n**Setup required:** Create these three folders in Outlook before running the workflow."
},
"typeVersion": 1
},
{
"id": "17cbe272-f507-4f06-b33d-25bebd644efc",
"name": "Nota adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1168,
1088
],
"parameters": {
"color": 5,
"width": 360,
"height": 240,
"content": "## ⚠️ Important Configuration Notes\n\n**Before running:**\n- Update OpenAI API credentials\n- Configure Microsoft Outlook connection\n- Create three folders: URGENT, Important, Not Important\n- Update folder IDs in Move nodes\n\n**Security:** Never hardcode API keys, use n8n credential system.\n\n**Testing:** Start with sample emails to verify folder routing and reply quality."
},
"typeVersion": 1
},
{
"id": "8d384320-be21-4688-a7d4-b16c97408ebc",
"name": "Nota adhesiva8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1168,
1424
],
"parameters": {
"color": 6,
"width": 360,
"height": 200,
"content": "## 💡 Customization Tips\n\n**Adjust classification:**\nEdit criteria in AI Email Classifier prompt, add more categories, or fine-tune urgency detection.\n\n**Personalize replies:**\nModify tone in each AI Agent's system message, add company-specific language, or include signature templates.\n\n**Extend functionality:**\nAdd Slack notifications for urgent emails, integrate with CRM systems, or create custom reporting dashboards."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "af094ceb-635c-4965-aaae-ad2459ce9bfc",
"connections": {
"e4c42889-28d6-4308-ac59-965972450ef9": {
"main": [
[
{
"node": "107fdc73-595c-4f16-969a-3fadcbb62441",
"type": "main",
"index": 0
}
],
[
{
"node": "744080bc-1296-4c1e-a0aa-3bd6aed8db0f",
"type": "main",
"index": 0
}
],
[
{
"node": "b9328e8e-75f9-479e-9008-fce7f7edfdff",
"type": "main",
"index": 0
}
]
]
},
"107fdc73-595c-4f16-969a-3fadcbb62441": {
"main": [
[
{
"node": "Reply to Urgent Email",
"type": "main",
"index": 0
}
]
]
},
"Reply to Urgent Email": {
"main": [
[
{
"node": "5231d92d-d9c2-4fbc-a10b-4080a9343c9d",
"type": "main",
"index": 0
}
]
]
},
"b9328e8e-75f9-479e-9008-fce7f7edfdff": {
"main": [
[
{
"node": "Reply to Not Important Email",
"type": "main",
"index": 0
}
]
]
},
"744080bc-1296-4c1e-a0aa-3bd6aed8db0f": {
"main": [
[
{
"node": "Reply to Important Email",
"type": "main",
"index": 0
}
]
]
},
"Reply to Important Email": {
"main": [
[
{
"node": "b944ef3f-560f-4745-8583-573914a8df1e",
"type": "main",
"index": 0
}
]
]
},
"c1f2aa2b-570c-4d6b-b0c8-13f9cea4bbf7": {
"main": [
[
{
"node": "e4c42889-28d6-4308-ac59-965972450ef9",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model - Urgent": {
"ai_languageModel": [
[
{
"node": "107fdc73-595c-4f16-969a-3fadcbb62441",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model - Standard": {
"ai_languageModel": [
[
{
"node": "b9328e8e-75f9-479e-9008-fce7f7edfdff",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Reply to Not Important Email": {
"main": [
[
{
"node": "227f3b68-24b8-49ac-a4c5-5df5583ffb3c",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model - Important": {
"ai_languageModel": [
[
{
"node": "744080bc-1296-4c1e-a0aa-3bd6aed8db0f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model - Classifier": {
"ai_languageModel": [
[
{
"node": "e4c42889-28d6-4308-ac59-965972450ef9",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Gestión de tickets, Resumen de IA
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Mattis
@iiiiiConsultant et expert en automatisation. Co-fondateur de l'agence PerformAi. Pas qu'un simple créateur, j'écoute et comprends l'importance pour simplifier votre activité au quotidien. On en discute ?
Compartir este flujo de trabajo