Chatbot de WhatsApp impulsado por IA que soporta texto, voz, imagen y PDF (RAG)

Avanzado

Este es unEngineering, Building Blocks, AIflujo de automatización del dominio deautomatización que contiene 35 nodos.Utiliza principalmente nodos como Set, Code, Switch, WhatsApp, GoogleDocs, combinando tecnología de inteligencia artificial para lograr automatización inteligente. Chatbot de WhatsApp impulsado por AI, soportando texto, voz, imagen y PDF (RAG)

Requisitos previos
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Clave de API de OpenAI
  • Cadena de conexión de MongoDB
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "074f90e2bb5206c5f405a8aac6551497c72005283a5405fb08207b1b3a78c2b8",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
      "name": "Agente de Base de Conocimiento",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3720,
        400
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": ""
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "c36731ce-5086-4a2f-8c3a-63be150fb8ae",
      "name": "Modelo de Chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3720,
        580
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "cJRah9hGPQ7eX4jd",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "53c2496a-0737-452c-b49c-ca0afa9c0073",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        4060,
        740
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "cJRah9hGPQ7eX4jd",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "54697b14-28a0-4572-b17e-328a7b52cc90",
      "name": "Al hacer clic en \"Ejecutar Flujo de Trabajo\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1380,
        -560
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a79b9b58-0211-4570-af84-64db8bef9de3",
      "name": "Memoria Simple",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        3820,
        580
      ],
      "parameters": {
        "sessionKey": "=memory_{{ $('WhatsApp Trigger').item.json.contacts[0].wa_id }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "fda97aec-70be-4611-94a3-7816e384c76b",
      "name": "Búsqueda Vectorial MongoDB",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
      "position": [
        3940,
        580
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {},
        "toolName": "productDocs",
        "mongoCollection": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-template",
          "cachedResultName": "n8n-template"
        },
        "toolDescription": "retreive documentation",
        "vectorIndexName": "data_index"
      },
      "credentials": {
        "mongoDb": {
          "id": "7riubYENUDZsmjyK",
          "name": "MongoDB account 2"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "8cf54cb6-7247-4036-b1e4-9a28650d700a",
      "name": "Cargador de Secciones de Documento",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1920,
        -400
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "doc_id",
                "value": "={{ $json.documentId }}"
              }
            ]
          }
        },
        "jsonData": "={{ $json.content }}",
        "jsonMode": "expressionData"
      },
      "typeVersion": 1
    },
    {
      "id": "4e93e3c3-1847-483a-b6a7-67ff2cff294f",
      "name": "Fragmentador de Documentos",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1920,
        -260
      ],
      "parameters": {
        "options": {
          "splitCode": "markdown"
        },
        "chunkSize": 3000,
        "chunkOverlap": 200
      },
      "typeVersion": 1
    },
    {
      "id": "4f616bfc-4ec7-4c88-8a63-cb2c47655680",
      "name": "Insertor de Almacén Vectorial MongoDB",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
      "position": [
        1820,
        -560
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "mongoCollection": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-template",
          "cachedResultName": "n8n-template"
        },
        "vectorIndexName": "data_index"
      },
      "credentials": {
        "mongoDb": {
          "id": "7riubYENUDZsmjyK",
          "name": "MongoDB account 2"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "cc9a0766-69a4-4745-97f5-4c4c5e156c91",
      "name": "Generador de Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1820,
        -400
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "cJRah9hGPQ7eX4jd",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a9368d23-e35f-4986-8060-30a05f3f9c05",
      "name": "Importador de Documentos Google",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1600,
        -560
      ],
      "parameters": {
        "operation": "get",
        "documentURL": "https://docs.google.com/document/d/1gvgp71e9edob8WLqFIYCdzC7kUq3pLO37VKb-a-vVW4/edit?tab=t.0"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "FNXMwqMf7vl1WUFj",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "1fb0f8a3-9113-4185-a935-0fc327f70881",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -580
      ],
      "parameters": {
        "color": 5,
        "content": "Run this workflow manually to import and index Google Docs product documentation into MongoDB with vector embeddings for fast search."
      },
      "typeVersion": 1
    },
    {
      "id": "62e13275-6f92-4799-9cbe-e0064ceb5140",
      "name": "Nota Adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        360
      ],
      "parameters": {
        "color": 4,
        "height": 280,
        "content": "This workflow listens for WhatsApp messages (text, audio, image, documents), converts them into embeddings, searches MongoDB, and uses GPT-4o-mini to provide context-aware answers with conversation memory."
      },
      "typeVersion": 1
    },
    {
      "id": "d21fc408-f66d-4b07-972a-811aa420b4ce",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2220,
        -580
      ],
      "parameters": {
        "height": 540,
        "content": "Search Index Example \n\n{\n  \"mappings\": {\n    \"dynamic\": false,\n    \"fields\": {\n      \"_id\": {\n        \"type\": \"string\"\n      },\n      \"text\": {\n        \"type\": \"string\"\n      },\n      \"embedding\": {\n        \"type\": \"knnVector\",\n        \"dimensions\": 1536,\n        \"similarity\": \"cosine\"\n      },\n      \"source\": {\n        \"type\": \"string\"\n      },\n      \"doc_id\": {\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ddc0fdb7-bacc-4f41-87bf-48bb714a404d",
      "name": "Disparador WhatsApp",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        1380,
        400
      ],
      "webhookId": "ab09ca3e-53b2-4079-9ddc-bccb2f69551b",
      "parameters": {
        "options": {},
        "updates": [
          "messages"
        ]
      },
      "credentials": {
        "whatsAppTriggerApi": {
          "id": "eb1MSQfEla9dGghs",
          "name": "WhatsApp OAuth account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8842d0c7-082e-4b4e-b350-a8bb8f47c390",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2460,
        160
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "translate"
      },
      "credentials": {
        "openAiApi": {
          "id": "cJRah9hGPQ7eX4jd",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a342dc14-0ffe-41ba-a3e9-853fe043f4fb",
      "name": "OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2460,
        400
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {
          "detail": "auto"
        },
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "cJRah9hGPQ7eX4jd",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "b1220587-fadf-4b5b-944e-b6e60b64c141",
      "name": "Extraer de PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3060,
        860
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "b02474a0-be6a-4591-a10c-abc2f597a3e6",
      "name": "Extraer de XLS",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2960,
        1060
      ],
      "parameters": {
        "options": {},
        "operation": "xls"
      },
      "typeVersion": 1
    },
    {
      "id": "1012f8a7-9fcb-4d80-ad5f-bfaa31eddf7d",
      "name": "Extraer de XLSX",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2960,
        1220
      ],
      "parameters": {
        "options": {},
        "operation": "xlsx",
        "binaryPropertyName": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "8891a2eb-16d6-471a-803e-df1789a336f3",
      "name": "Mapear JSON",
      "type": "n8n-nodes-base.set",
      "position": [
        3200,
        980
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "72ae0d20-616a-4a65-9b14-53bf53656091",
              "name": "data",
              "type": "string",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a0920bc7-71bd-4803-bbce-4cef14cac5ee",
      "name": "Mapear extensiones de archivo",
      "type": "n8n-nodes-base.code",
      "position": [
        2420,
        740
      ],
      "parameters": {
        "jsCode": "let requests = $(\"Download Document\").all()\n\nrequests.forEach((request) => {\n  let mime_type = request.json.mime_type\n\n  if (\n    mime_type === \"text/calendar\" || \n    mime_type === \"application/ics\" || \n    mime_type === \"text/x-calendar\"\n  ) {\n    request.json.mime_type = \"mapped/calendar\"\n  }\n\n  if (\n    mime_type === \"application/xml\" || \n    mime_type === \"text/xml\") {\n    request.json.mime_type = \"mapped/xml\"\n  }\n\n  if (!mime_type) {\n    request.json.mime_type = $('Gets WhatsApp Document Source URL').first().json.mime_type\n  }\n})\n\nreturn requests;"
      },
      "typeVersion": 2
    },
    {
      "id": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
      "name": "Mapear prompt de documento",
      "type": "n8n-nodes-base.set",
      "position": [
        3440,
        800
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "da68bcca-a2a6-4676-8649-6fb1b664e44c",
              "name": "text",
              "type": "string",
              "value": "=Parsed text: {{ $json.text || $json.data || $json }}\n\nCaption text: {{ $('Route Types').item.json.messages[0].document.caption }}\n\nMimeType: {{ $('Gets WhatsApp Document Source URL').item.json.mime_type }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "90821e49-c98d-4617-8289-1be6d3aeb087",
      "name": "Mapear prompt de imagen",
      "type": "n8n-nodes-base.set",
      "position": [
        2680,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "48af2dcc-4ce9-45fc-abfc-54f803930092",
              "name": "text",
              "type": "string",
              "value": "=User image description: {{ $json.content }}\n\nUser image caption: {{ $('Route Types').item.json.messages[0].image.caption }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "cf603f5c-0a6e-4cdd-846b-738ed417daa2",
      "name": "Mapear prompt de texto",
      "type": "n8n-nodes-base.set",
      "position": [
        2020,
        -40
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "38aec976-a32c-4b0e-85f4-c90adc16abc9",
              "name": "text",
              "type": "string",
              "value": "={{ $json.messages[0].text.body }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7727e89d-cf21-4440-ab7f-85594eb1ec44",
      "name": "Obtener URL de Origen de Correo de Voz WhatsApp",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2020,
        160
      ],
      "webhookId": "bbe62f3d-8788-49d4-aae6-9e9411446d44",
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.messages[0].audio.id}}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "HuYOJ00weACKEFR6",
          "name": "WhatsApp account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "08b938a1-d32e-4aa1-958f-bdabd3dfec13",
      "name": "Obtener URL de Origen de Imagen WhatsApp",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2020,
        400
      ],
      "webhookId": "c2982df4-1d8d-4669-a724-44ae17d11e6c",
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.messages[0].image.id }}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "HuYOJ00weACKEFR6",
          "name": "WhatsApp account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d934ce80-cdb0-476d-8896-b8c226086933",
      "name": "Obtener URL de Origen de Documento WhatsApp",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2020,
        740
      ],
      "webhookId": "c2982df4-1d8d-4669-a724-44ae17d11e6c",
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.messages[0].document.id }}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "HuYOJ00weACKEFR6",
          "name": "WhatsApp account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "aad1b221-0985-43e7-bc0b-312436171abe",
      "name": "Descargar Correo de Voz",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2240,
        160
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "VZo8qdSLzpZ3qRlq",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dfd08bec-9d30-4125-b167-7feaeefd7afa",
      "name": "Descargar Imagen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2240,
        400
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "VZo8qdSLzpZ3qRlq",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ba3d221f-ce5c-4105-82cf-fbd11c2c0e2f",
      "name": "Descargar Documento",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2240,
        740
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {
          "response": {
            "response": {}
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "VZo8qdSLzpZ3qRlq",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "87ecc44f-cc1f-47e0-b995-079230be118d",
      "name": "Enrutar Tipos",
      "type": "n8n-nodes-base.switch",
      "position": [
        1600,
        380
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "2fc5c912-629b-4cbe-b5e3-7e3f0651c628",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.messages[0].type }}",
                    "rightValue": "text"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Audio",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "26a3d85c-0815-48ff-85ce-713129a1107c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.messages[0].type }}",
                    "rightValue": "audio"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Image",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "840b95b8-6559-4fb7-b32c-651451d6d0d2",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.messages[0].type }}",
                    "rightValue": "image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Document",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "3e7a07f9-b785-450c-8c68-f6b276838503",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.messages[0].type }}",
                    "rightValue": "document"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "ce3d08ce-4445-4473-90b2-227ba065c4d8",
      "name": "Enrutar Tipos de Documento",
      "type": "n8n-nodes-base.switch",
      "position": [
        2680,
        580
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "CSV",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "14e23243-cd44-4cb1-99bd-9e6905d511ad",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "text/csv"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "HTML",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6d7616c5-6bdd-47b7-923e-639491d15a4e",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "text/html"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Calendar",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "a2174e02-378a-41ff-b269-61f4fc3f1de9",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "=mapped/calendar"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "RTF",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f3b406d7-362d-473e-8edd-c3e5f2d9c44c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "text/rtf"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "TXT",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "64dd4658-54e7-4453-adbc-7067dffcd555",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "text/plain"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "XML",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "7540a3ab-b48e-4bec-94e9-a5dfc3d65a4c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "mapped/xml"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "PDF",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "88b618fd-9a88-491e-91dd-c5fc9efa36e3",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "application/pdf"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "JSON",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9c4d90aa-b4ea-4a63-b15e-666899c8360e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "application/json"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "XLS",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9baa7c88-3950-4099-8498-99a4640b95e7",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "application/vnd.ms-excel"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "XLSX",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b83e540c-ba1e-42d0-ac83-f675e25e6aea",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "ELSE",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ea3be820-2ead-4ec2-b292-42d3c7804b55",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.mime_type }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "18684032-23ec-4e10-88f4-e93363432a67",
      "name": "Enviar Respuesta No Soportada",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2960,
        1380
      ],
      "webhookId": "017d267f-4897-4726-bf03-304ef10352bf",
      "parameters": {
        "textBody": "=The File type you provided is unsupported.",
        "operation": "send",
        "phoneNumberId": "677680658761861",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "HuYOJ00weACKEFR6",
          "name": "WhatsApp account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "acc8e4ae-0610-42fc-a318-b9a23a38919b",
      "name": "Enviar Respuesta",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        4080,
        400
      ],
      "webhookId": "23834751-5066-48ba-8e19-549680df2b27",
      "parameters": {
        "textBody": "={{ $json.output }}",
        "operation": "send",
        "phoneNumberId": "677680658761861",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "HuYOJ00weACKEFR6",
          "name": "WhatsApp account"
        }
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "8842d0c7-082e-4b4e-b350-a8bb8f47c390": {
      "main": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a342dc14-0ffe-41ba-a3e9-853fe043f4fb": {
      "main": [
        [
          {
            "node": "90821e49-c98d-4617-8289-1be6d3aeb087",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8891a2eb-16d6-471a-803e-df1789a336f3": {
      "main": [
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "87ecc44f-cc1f-47e0-b995-079230be118d": {
      "main": [
        [
          {
            "node": "cf603f5c-0a6e-4cdd-846b-738ed417daa2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "7727e89d-cf21-4440-ab7f-85594eb1ec44",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "08b938a1-d32e-4aa1-958f-bdabd3dfec13",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d934ce80-cdb0-476d-8896-b8c226086933",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a79b9b58-0211-4570-af84-64db8bef9de3": {
      "ai_memory": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "dfd08bec-9d30-4125-b167-7feaeefd7afa": {
      "main": [
        [
          {
            "node": "a342dc14-0ffe-41ba-a3e9-853fe043f4fb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cf603f5c-0a6e-4cdd-846b-738ed417daa2": {
      "main": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4e93e3c3-1847-483a-b6a7-67ff2cff294f": {
      "ai_textSplitter": [
        [
          {
            "node": "8cf54cb6-7247-4036-b1e4-9a28650d700a",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "b1220587-fadf-4b5b-944e-b6e60b64c141": {
      "main": [
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b02474a0-be6a-4591-a10c-abc2f597a3e6": {
      "main": [
        [
          {
            "node": "8891a2eb-16d6-471a-803e-df1789a336f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "90821e49-c98d-4617-8289-1be6d3aeb087": {
      "main": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ddc0fdb7-bacc-4f41-87bf-48bb714a404d": {
      "main": [
        [
          {
            "node": "87ecc44f-cc1f-47e0-b995-079230be118d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ba3d221f-ce5c-4105-82cf-fbd11c2c0e2f": {
      "main": [
        [
          {
            "node": "a0920bc7-71bd-4803-bbce-4cef14cac5ee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "53c2496a-0737-452c-b49c-ca0afa9c0073": {
      "ai_embedding": [
        [
          {
            "node": "fda97aec-70be-4611-94a3-7816e384c76b",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "1012f8a7-9fcb-4d80-ad5f-bfaa31eddf7d": {
      "main": [
        [
          {
            "node": "8891a2eb-16d6-471a-803e-df1789a336f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c36731ce-5086-4a2f-8c3a-63be150fb8ae": {
      "ai_languageModel": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "aad1b221-0985-43e7-bc0b-312436171abe": {
      "main": [
        [
          {
            "node": "8842d0c7-082e-4b4e-b350-a8bb8f47c390",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "77302aa3-6e87-4de6-9ec7-387ddb76fc84": {
      "main": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a0920bc7-71bd-4803-bbce-4cef14cac5ee": {
      "main": [
        [
          {
            "node": "ce3d08ce-4445-4473-90b2-227ba065c4d8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a9368d23-e35f-4986-8060-30a05f3f9c05": {
      "main": [
        [
          {
            "node": "4f616bfc-4ec7-4c88-8a63-cb2c47655680",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c": {
      "main": [
        [
          {
            "node": "acc8e4ae-0610-42fc-a318-b9a23a38919b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ce3d08ce-4445-4473-90b2-227ba065c4d8": {
      "main": [
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "77302aa3-6e87-4de6-9ec7-387ddb76fc84",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b1220587-fadf-4b5b-944e-b6e60b64c141",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "8891a2eb-16d6-471a-803e-df1789a336f3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b02474a0-be6a-4591-a10c-abc2f597a3e6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "1012f8a7-9fcb-4d80-ad5f-bfaa31eddf7d",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "18684032-23ec-4e10-88f4-e93363432a67",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fda97aec-70be-4611-94a3-7816e384c76b": {
      "ai_tool": [
        [
          {
            "node": "d1b47f60-5a4d-4629-a18d-b3c6ec0c972c",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "8cf54cb6-7247-4036-b1e4-9a28650d700a": {
      "ai_document": [
        [
          {
            "node": "4f616bfc-4ec7-4c88-8a63-cb2c47655680",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "18684032-23ec-4e10-88f4-e93363432a67": {
      "main": [
        []
      ]
    },
    "cc9a0766-69a4-4745-97f5-4c4c5e156c91": {
      "ai_embedding": [
        [
          {
            "node": "4f616bfc-4ec7-4c88-8a63-cb2c47655680",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "08b938a1-d32e-4aa1-958f-bdabd3dfec13": {
      "main": [
        [
          {
            "node": "dfd08bec-9d30-4125-b167-7feaeefd7afa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "54697b14-28a0-4572-b17e-328a7b52cc90": {
      "main": [
        [
          {
            "node": "a9368d23-e35f-4986-8060-30a05f3f9c05",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d934ce80-cdb0-476d-8896-b8c226086933": {
      "main": [
        [
          {
            "node": "ba3d221f-ce5c-4105-82cf-fbd11c2c0e2f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7727e89d-cf21-4440-ab7f-85594eb1ec44": {
      "main": [
        [
          {
            "node": "aad1b221-0985-43e7-bc0b-312436171abe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿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 - Ingeniería, Bloques de construcción, Inteligencia Artificial

¿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.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos35
Categoría3
Tipos de nodos18
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Autor
NovaNode

NovaNode

@thomasgpt

NovaNode is a software factory building scalable AI for modern businesses. We specialize in omni-channel AI agents that automate customer support, sales, and operations across voice, WhatsApp, email, and chat. We serve both enterprise clients and SMEs, balancing deep integrations with speed and cost-efficiency. By combining automation with adaptability, we help companies scale faster and operate smarter. NovaNode is where AI meets execution.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34