Agente de gestión de bandeja de entrada
Este es unAI Summarization, Multimodal AIflujo de automatización del dominio deautomatización que contiene 8 nodos.Utiliza principalmente nodos como Gmail, GmailTrigger, LmChatOpenAi, TextClassifier. Etiquetar automáticamente correos de Gmail usando la clasificación con GPT-5
- •Cuenta de Google y credenciales de API de Gmail
- •Clave de API de OpenAI
Nodos utilizados (8)
Categoría
{
"id": "iPhhNVPzleZr44YK",
"meta": {
"instanceId": "cbbe3d07d282d90d2165a7ab7800571be416166e6eb660e7a28cfe9b84473f49",
"templateCredsSetupCompleted": true
},
"name": "Inbox Management Agent",
"tags": [],
"nodes": [
{
"id": "240f8e93-87f3-4185-bc12-9b82ab43ce9c",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-336,
-128
],
"parameters": {
"simple": false,
"filters": {},
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "VI8hpbWunRMMvR6a",
"name": "Gmail account"
}
},
"typeVersion": 1.3
},
{
"id": "c6b683ca-49c4-41b2-aace-9cc434164460",
"name": "Clasificador de Texto",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
-112,
-128
],
"parameters": {
"options": {},
"inputText": "={{ $json.text }}",
"categories": {
"categories": [
{
"category": "High Priority",
"description": "Emails that require immediate attention or quick response, often from executives, key clients, or internal stakeholders. These usually involve time-sensitive issues, deadlines, or escalations. Keywords/phrases to look for: “urgent,” “ASAP,” “immediate response,” “deadline,” “critical,” “important matter.”"
},
{
"category": "Promotion",
"description": "Emails related to marketing campaigns, sales offers, product launches, or event invitations. Typically sent in bulk and often contain discounts, new features, or company news. Keywords/phrases to look for: “special offer,” “discount,” “limited time,” “new product,” “webinar,” “sale,” “exclusive invite.”"
},
{
"category": "Finance/Billing",
"description": "Emails dealing with payments, invoices, receipts, or financial records. May come from vendors, clients, or internal finance teams. Usually involve transactions, balances, or account updates. Keywords/phrases to look for: “invoice,” “payment due,” “billing,” “receipt,” “account statement,” “refund,” “transaction.”"
},
{
"category": "Customer Support",
"description": "Emails from customers seeking help, troubleshooting, or service requests. Often include questions, complaints, or technical issues that require a response or resolution. Keywords/phrases to look for: “issue,” “not working,” “help,” “support needed,” “error,” “problem with,” “can you fix.”"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "572a1a99-1193-4128-9073-43b5a8a11d11",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-40,
160
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5",
"cachedResultName": "gpt-5"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "BmIUKpYmW7YRSbaU",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "02ca20f3-241e-42df-8969-0c97119b77f8",
"name": "Alta Prioridad",
"type": "n8n-nodes-base.gmail",
"position": [
240,
-416
],
"webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
"parameters": {
"labelIds": [
"Label_2050230922550608961"
],
"messageId": "={{ $json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "VI8hpbWunRMMvR6a",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "66943ca1-563f-426a-8d81-10be52294555",
"name": "Promoción",
"type": "n8n-nodes-base.gmail",
"position": [
240,
-224
],
"webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
"parameters": {
"labelIds": [
"Label_4137435394166770583",
"CATEGORY_PROMOTIONS"
],
"messageId": "={{ $json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "VI8hpbWunRMMvR6a",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "32916943-2fc8-4b25-b986-bbc5ba64df7a",
"name": "Finanzas/Facturación",
"type": "n8n-nodes-base.gmail",
"position": [
240,
-32
],
"webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
"parameters": {
"labelIds": [
"Label_123317652592217245"
],
"messageId": "={{ $json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "VI8hpbWunRMMvR6a",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "ec3002b3-20a6-44c0-855f-43788eedbd4c",
"name": "Soporte al Cliente",
"type": "n8n-nodes-base.gmail",
"position": [
240,
160
],
"webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
"parameters": {
"labelIds": [
"Label_3866679317291552912"
],
"messageId": "={{ $json.id }}",
"operation": "addLabels"
},
"credentials": {
"gmailOAuth2": {
"id": "VI8hpbWunRMMvR6a",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "fb064df0-b84c-466c-b773-7e71e4fcd863",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1008,
-1280
],
"parameters": {
"width": 1520,
"height": 2064,
"content": "# Smart Gmail inbox organization with OpenAI classification\n\n## Who's it for\nThis template is perfect for busy professionals, customer service teams, and small business owners who receive high volumes of email and struggle to keep their Gmail inbox organized. If you're spending too much time manually sorting emails or missing important messages in the clutter, this AI-powered solution will transform your email management.\n\n## How it works\nThis workflow automatically monitors your Gmail inbox and uses OpenAI's GPT model to intelligently classify incoming emails into four key categories:\n - High Priority - Urgent emails requiring immediate attention from executives, clients, or stakeholders\n - Promotion - Marketing emails, sales offers, product launches, and event invitations\n - Finance/Billing - Invoices, receipts, payment notifications, and financial records\n - Customer Support - Help requests, troubleshooting queries, and service-related issues\n \nOnce classified, emails are automatically labeled in Gmail using the appropriate tags, making it easy to filter, search, and prioritize your communications.\n\n## How to set up\n### Requirements\n - Gmail account with OAuth2 access enabled\n - OpenAI API key with GPT model access\n - Custom Gmail labels created for each category\n\n### Step-by-step setup\n 1. Create Gmail Labels\n - In Gmail, create these labels: \"High Priority\", \"Promotion\", \"Finance/Billing\", \"Customer Support\"\n - Note the label IDs (you'll need to replace the hardcoded ones in the workflow)\n 2. Configure Credentials\n - Add your Gmail OAuth2 credentials in n8n\n - Add your OpenAI API credentials\n 3. Update Label IDs\n - Replace the hardcoded label IDs in each Gmail node with your actual label IDs\n - You can find label IDs by testing the Gmail node or using Gmail API\n 4. Adjust Classification Rules\n - Review the Text Classifier categories and modify descriptions to match your specific needs\n - Add or remove categories as required\n 5. Set Polling Frequency\n - The workflow is set to check every minute - adjust based on your email volume\n\n\n## How to customize the workflow\n### Modify Categories\n - Edit the Text Classifier node to add/remove email categories\n - Update category descriptions to better match your business context\n - Add corresponding Gmail nodes for new categories\n\n### Change AI Model\n - Switch from GPT-5 to GPT-4 or GPT-3.5-turbo based on your needs and budget\n - Adjust the model parameters in the OpenAI Chat Model node\n\n### Add Actions Beyond Labeling\n - **Star important** emails by adding a Gmail \"star\" action for high priority items\n - **Forward to team members** using additional Gmail send nodes\n - **Create calendar events** from meeting requests using Google Calendar integration\n - **Log to spreadsheet** for email analytics using Google Sheets\n\n### Advanced Filtering\n - Add Gmail filter conditions to the trigger (sender, subject patterns, etc.)\n - Include/exclude specific email addresses or domains\n - Set up different polling schedules for different email types\n\n### Notification Options\n - Add Slack notifications for high priority emails\n - Send SMS alerts using Twilio for critical messages\n - Create tickets in your support system for customer inquiries\n\n### Security considerations\n - Never hardcode API keys in the workflow - always use n8n's credential system\n - Review OpenAI's data usage policies for email content processing\n - Consider data retention policies for processed email content\n - Test thoroughly with non-sensitive emails first\n\n### Troubleshooting tips\n - Classification accuracy: Fine-tune category descriptions if emails are being misclassified\n - Rate limits: Monitor OpenAI API usage to avoid hitting rate limits with high email volumes\n - Gmail quotas: Be aware of Gmail API quotas when processing large volumes\n - Label sync: Allow time for Gmail labels to sync across devices and clients\n"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "874dd28f-0458-49bd-9e50-f23fd049c08a",
"connections": {
"240f8e93-87f3-4185-bc12-9b82ab43ce9c": {
"main": [
[
{
"node": "c6b683ca-49c4-41b2-aace-9cc434164460",
"type": "main",
"index": 0
}
]
]
},
"c6b683ca-49c4-41b2-aace-9cc434164460": {
"main": [
[
{
"node": "02ca20f3-241e-42df-8969-0c97119b77f8",
"type": "main",
"index": 0
}
],
[
{
"node": "66943ca1-563f-426a-8d81-10be52294555",
"type": "main",
"index": 0
}
],
[
{
"node": "32916943-2fc8-4b25-b986-bbc5ba64df7a",
"type": "main",
"index": 0
}
],
[
{
"node": "ec3002b3-20a6-44c0-855f-43788eedbd4c",
"type": "main",
"index": 0
}
]
]
},
"572a1a99-1193-4128-9073-43b5a8a11d11": {
"ai_languageModel": [
[
{
"node": "c6b683ca-49c4-41b2-aace-9cc434164460",
"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?
Intermedio - Resumen de IA, IA Multimodal
¿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
Abideen Bello
@bideenData/Automation consultant with experience helping Sales & Marketing teams to streamline their processes. Use my link to book an initial consultation for custom n8n work.
Compartir este flujo de trabajo