Asistente de Bandeja de Entrada
Este es unTicket Management, AI Summarizationflujo de automatización del dominio deautomatización que contiene 14 nodos.Utiliza principalmente nodos como If, Code, Gmail, Slack, GmailTrigger. Asistente de correo electrónico con IA: prioriza correos de Gmail mediante resúmenes de ChatGPT y resúmenes en Slack
- •Cuenta de Google y credenciales de API de Gmail
- •Bot Token de Slack o URL de Webhook
- •Credenciales de API de Google Sheets
- •Clave de API de OpenAI
Nodos utilizados (14)
Categoría
{
"id": "SjqkLDL6TjA4qhXe",
"meta": {
"instanceId": "b37534993660b16a153506cfc0b71f79e6887c5743e20be7be0d1ad118ae0486",
"templateCredsSetupCompleted": true
},
"name": "InboxPilot",
"tags": [],
"nodes": [
{
"id": "66e1eca5-d977-4ead-8138-8eab926dfbfb",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
0,
0
],
"parameters": {
"filters": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "jwGNRLOxPPW8br4P",
"name": "Gmail account 2"
}
},
"typeVersion": 1.2
},
{
"id": "87e1fc81-4e18-4f7b-b3f3-d4cdc8f740a6",
"name": "Enviar mensaje a un modelo",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
220,
0
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You're an email assistant for a busy startup founder. Classify the email content into the following fields and return **only raw JSON** (no markdown):\n\n{\n \"summary\": [Short summary of the email in 1 sentence],\n \"urgency\": [High, Medium, Low],\n \"category\": [Investor, Customer Lead, Support, Spam, Other],\n \"intent\": [Short phrase, like \"Request for call\", \"Feature request\", \"Follow-up\"]\n}\n\nAnalyze the following email:\n\nSubject: {{ $json.Subject }}\nBody: {{ $json.snippet }}\n\nReturn only valid JSON with no extra formatting.\n"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "aJq3jnvAs37EGBXF",
"name": "n8n free OpenAI API credits"
}
},
"typeVersion": 1.8
},
{
"id": "c457ff9f-2b06-4b15-91e8-41fb9dff5ffa",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
880,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "1ec24de2-2e64-4386-aa00-62603a63aef5",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.urgency }}",
"rightValue": "High"
},
{
"id": "0ed8beae-9ef7-46b7-9aca-5cd83412bceb",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.urgency }}",
"rightValue": "Medium"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ce7d28e9-9ace-4ec8-8408-0d7e6059675f",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
580,
0
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "let raw = $json.message?.content || $json.message || \"\";\n\n// Remove triple backticks (```json ... ```)\nraw = raw.replace(/```json|```/g, '').trim();\n\n// Fix smart quotes and other formatting problems\nraw = raw.replace(/[“”]/g, '\"').replace(/[‘’]/g, \"'\");\n\ntry {\n const parsed = JSON.parse(raw);\n\n return {\n summary: parsed.summary || \"No summary provided\",\n urgency: parsed.urgency || \"Unknown\",\n category: parsed.category || \"Unknown\",\n intent: parsed.intent || \"Unknown\"\n };\n} catch (err) {\n return {\n summary: \"⚠️ Failed to parse GPT output\",\n urgency: \"Unknown\",\n category: \"Unknown\",\n intent: \"Unknown\",\n error: err.message,\n original: raw\n };\n}\n"
},
"typeVersion": 2
},
{
"id": "353b70b5-eaad-4636-9bed-23aec2556d47",
"name": "Enviar un mensaje",
"type": "n8n-nodes-base.slack",
"position": [
1080,
-100
],
"webhookId": "8d75cfb9-ac55-4745-b37d-013995518ff1",
"parameters": {
"text": "=📬 *Important Email Detected* *Summary:* {{ $('Code').item.json.summary }} *Urgency:* {{ $('Code').item.json.urgency }} 📥 From: {{ $('Gmail Trigger').item.json.From }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C093BMY0ESX",
"cachedResultName": "alerts"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "Af5ru4q6Grpps5kG",
"name": "Slack account"
}
},
"typeVersion": 2.3
},
{
"id": "e9d6f184-b2ef-41aa-9df0-e58861a93a2e",
"name": "Añadir etiqueta al mensaje",
"type": "n8n-nodes-base.gmail",
"position": [
1080,
40
],
"webhookId": "2e09aafe-567b-4205-8905-bc0cafee56cb",
"parameters": {
"labelIds": [
"Label_2"
],
"messageId": "={{ $node[\"Gmail Trigger\"].json[\"id\"] }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "jwGNRLOxPPW8br4P",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "f1109948-ab40-4f82-84f7-23fdbfc40d6b",
"name": "Añadir etiqueta al mensaje1",
"type": "n8n-nodes-base.gmail",
"position": [
1300,
-100
],
"webhookId": "2e09aafe-567b-4205-8905-bc0cafee56cb",
"parameters": {
"labelIds": [
"Label_4585164412428469148"
],
"messageId": "={{ $node[\"Gmail Trigger\"].json[\"id\"] }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "jwGNRLOxPPW8br4P",
"name": "Gmail account 2"
}
},
"typeVersion": 2.1
},
{
"id": "73ea5151-4ef3-43b7-a73e-cd5d7f736363",
"name": "Agregar fila en hoja de cálculo",
"type": "n8n-nodes-base.googleSheets",
"position": [
1520,
-100
],
"parameters": {
"columns": {
"value": {
"From": "={{ $('Gmail Trigger').item.json.From }}",
"Summary": "={{ $('Code').item.json.summary }}",
"Urgency": "={{ $('Code').item.json.urgency }}",
"Category": "={{ $('Code').item.json.category }}",
"Timestamp": "={{ $now }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "From",
"type": "string",
"display": true,
"required": false,
"displayName": "From",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Urgency",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Urgency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Category",
"type": "string",
"display": true,
"required": false,
"displayName": "Category",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug/edit?usp=drivesdk",
"cachedResultName": "Inbox Log"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "1HFV5dnUJndtPhEM",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "c588a35e-0230-4134-bf06-d6a0d3d5cda1",
"name": "Agregar fila en hoja de cálculo1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1300,
60
],
"parameters": {
"columns": {
"value": {
"From": "={{ $('Gmail Trigger').item.json.From }}",
"Summary": "={{ $('Code').item.json.summary }}",
"Urgency": "={{ $('Code').item.json.urgency }}",
"Category": "={{ $('Code').item.json.category }}",
"Timestamp": "={{ $now }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "From",
"type": "string",
"display": true,
"required": false,
"displayName": "From",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Urgency",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Urgency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Category",
"type": "string",
"display": true,
"required": false,
"displayName": "Category",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug/edit?usp=drivesdk",
"cachedResultName": "Inbox Log"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "1HFV5dnUJndtPhEM",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "8f2cd361-317c-4aab-8712-4ac47d337af3",
"name": "Trigger programado",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
220
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 19
}
]
}
},
"typeVersion": 1.2
},
{
"id": "34161afd-e52b-4d6d-a973-9c4c63cd218c",
"name": "Obtener fila(s) en hoja de cálculo",
"type": "n8n-nodes-base.googleSheets",
"position": [
220,
220
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1YQgWOSF-UA9gR1_pc6RzJ3UeANqnqi29ldoUd_2CPug/edit?usp=drivesdk",
"cachedResultName": "Inbox Log"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "1HFV5dnUJndtPhEM",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "d8eeb0ff-6d67-4586-8512-4d4da995de27",
"name": "Code1",
"type": "n8n-nodes-base.code",
"position": [
440,
220
],
"parameters": {
"jsCode": "const today = new Date().toISOString().split(\"T\")[0];\n\nreturn items.filter(item => {\n const timestamp = item.json.Timestamp || item.json.timestamp || \"\";\n const urgency = (item.json.Urgency || item.json.urgency || \"\").toLowerCase();\n\n const rowDate = new Date(timestamp).toISOString().split(\"T\")[0];\n\n return rowDate === today && (urgency === \"high\" || urgency === \"medium\");\n});\n"
},
"typeVersion": 2
},
{
"id": "fbe2ac0e-b671-4bff-9ef1-db9abb7fc23c",
"name": "Code2",
"type": "n8n-nodes-base.code",
"position": [
660,
220
],
"parameters": {
"jsCode": "let text = `🗓️ *Daily Digest – ${new Date().toLocaleDateString()}*\\n\\n`;\n\nif (items.length === 0) {\n text += \"_No important messages today._\";\n} else {\n items.forEach((item, index) => {\n text += `*${index + 1}.* ${item.json.Summary || \"No summary\"}\\nUrgency: ${item.json.Urgency || \"Unknown\"}\\nCategory: ${item.json.Category || \"Unknown\"}\\nIntent: ${item.json.Intent || \"N/A\"}\\n\\n`;\n });\n}\n\nreturn [{ json: { text } }];\n"
},
"typeVersion": 2
},
{
"id": "1ec81105-9ac6-4167-8dc4-c5742d99764a",
"name": "Enviar un mensaje1",
"type": "n8n-nodes-base.slack",
"position": [
900,
220
],
"webhookId": "8d75cfb9-ac55-4745-b37d-013995518ff1",
"parameters": {
"text": "=🧠 *Inbox Assistant – Daily Digest* \n📅 *{{ $now.format(\"DD MMM YYYY\") }}* \n━━━━━━━━━━━━━━━━━━━\n\n{{ $json.text }}\n",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C0934EF3CRM",
"cachedResultName": "daily-digest"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "Af5ru4q6Grpps5kG",
"name": "Slack account"
}
},
"typeVersion": 2.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "e2ed6dc8-752e-48cd-8ba9-c02d87ebfd88",
"connections": {
"c457ff9f-2b06-4b15-91e8-41fb9dff5ffa": {
"main": [
[
{
"node": "353b70b5-eaad-4636-9bed-23aec2556d47",
"type": "main",
"index": 0
}
],
[
{
"node": "e9d6f184-b2ef-41aa-9df0-e58861a93a2e",
"type": "main",
"index": 0
}
]
]
},
"ce7d28e9-9ace-4ec8-8408-0d7e6059675f": {
"main": [
[
{
"node": "c457ff9f-2b06-4b15-91e8-41fb9dff5ffa",
"type": "main",
"index": 0
}
]
]
},
"d8eeb0ff-6d67-4586-8512-4d4da995de27": {
"main": [
[
{
"node": "fbe2ac0e-b671-4bff-9ef1-db9abb7fc23c",
"type": "main",
"index": 0
}
]
]
},
"fbe2ac0e-b671-4bff-9ef1-db9abb7fc23c": {
"main": [
[
{
"node": "1ec81105-9ac6-4167-8dc4-c5742d99764a",
"type": "main",
"index": 0
}
]
]
},
"66e1eca5-d977-4ead-8138-8eab926dfbfb": {
"main": [
[
{
"node": "87e1fc81-4e18-4f7b-b3f3-d4cdc8f740a6",
"type": "main",
"index": 0
}
]
]
},
"353b70b5-eaad-4636-9bed-23aec2556d47": {
"main": [
[
{
"node": "f1109948-ab40-4f82-84f7-23fdbfc40d6b",
"type": "main",
"index": 0
}
]
]
},
"87e1fc81-4e18-4f7b-b3f3-d4cdc8f740a6": {
"main": [
[
{
"node": "ce7d28e9-9ace-4ec8-8408-0d7e6059675f",
"type": "main",
"index": 0
}
]
]
},
"1ec81105-9ac6-4167-8dc4-c5742d99764a": {
"main": [
[]
]
},
"8f2cd361-317c-4aab-8712-4ac47d337af3": {
"main": [
[
{
"node": "34161afd-e52b-4d6d-a973-9c4c63cd218c",
"type": "main",
"index": 0
}
]
]
},
"34161afd-e52b-4d6d-a973-9c4c63cd218c": {
"main": [
[
{
"node": "d8eeb0ff-6d67-4586-8512-4d4da995de27",
"type": "main",
"index": 0
}
]
]
},
"e9d6f184-b2ef-41aa-9df0-e58861a93a2e": {
"main": [
[
{
"node": "c588a35e-0230-4134-bf06-d6a0d3d5cda1",
"type": "main",
"index": 0
}
]
]
},
"f1109948-ab40-4f82-84f7-23fdbfc40d6b": {
"main": [
[
{
"node": "73ea5151-4ef3-43b7-a73e-cd5d7f736363",
"type": "main",
"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?
Intermedio - 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
Darsheel
@n8ndarsheelCompartir este flujo de trabajo