AutomationFlowsAI & RAG › Reply to Whatsapp Text, Audio, Image, and Video with Google Gemini and Wikipedia

Reply to Whatsapp Text, Audio, Image, and Video with Google Gemini and Wikipedia

ByRedowan Ahmed Farhan @redowanfarhan on n8n.io

This workflow auto-replies to incoming WhatsApp messages (text, audio, video, or images) by downloading any media, converting it to text with Google Gemini, and generating a concise answer with a Gemini-powered agent that can use Wikipedia for factual lookups. Triggers when a…

Event trigger★★★★☆ complexityAI-powered29 nodesWhatsApp TriggerWhatsAppHTTP RequestMemory Buffer WindowTool WikipediaChain LlmGoogle Gemini ChatAgent
AI & RAG Trigger: Event Nodes: 29 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #17437 — we link there as the canonical source.

This workflow follows the Agent → Chainllm recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "dd2mK6aG4p6XKh09",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "whatsapp AI auto responder",
  "tags": [],
  "nodes": [
    {
      "id": "1ae67eac-4c4e-4be9-839b-7f4bb0336295",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2944,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 580,
        "height": 1620,
        "content": "## \ud83d\udcf1 WhatsApp AI Auto Responder (Multimodal)\n\nAnswers incoming WhatsApp messages of any type \u2014 text, audio, video, or image \u2014 by transcribing/describing the media with Gemini, then replying via a general-knowledge AI Agent with Wikipedia lookup.\n\n**Perfect for:** Small businesses or creators offering a public WhatsApp assistant that must handle whatever a customer sends, not just text.\n\n---\n\n## How it works\n\n1. **WhatsApp Trigger** \u2014 Receives incoming WhatsApp messages (text, audio, video, or image).\n2. **Split Out Message Parts** \u2014 Splits the trigger's messages array into individual message items.\n3. **Redirect Message Types** \u2014 Switch that routes each message to one of four branches: Audio, Video, Image, or Text (fallback).\n4. **Get Audio URL** *(audio branch)* \u2014 Fetches the downloadable media URL for a voice note.\n5. **Download Audio** *(audio branch)* \u2014 Downloads the audio file binary.\n6. **Google Gemini Audio** *(audio branch)* \u2014 Sends the audio to Gemini 1.5 Pro to transcribe it.\n7. **Format Response1** *(audio branch)* \u2014 Extracts the transcription text from Gemini's response.\n8. **Get Video URL** *(video branch)* \u2014 Fetches the downloadable media URL for a video.\n9. **Download Video** *(video branch)* \u2014 Downloads the video file binary.\n10. **Google Gemini Video** *(video branch)* \u2014 Sends the video to Gemini 1.5 Pro to describe it.\n11. **Format Response** *(video branch)* \u2014 Extracts the description text from Gemini's response.\n12. **Get Image URL** *(image branch)* \u2014 Fetches the downloadable media URL for an image.\n13. **Download Image** *(image branch)* \u2014 Downloads the image file binary.\n14. **Image Explainer** *(image branch)* \u2014 LangChain chain (using Google Gemini Chat Model1) that describes the image and transcribes visible text.\n15. **Get Text** *(text branch, fallback)* \u2014 Wait node that passes plain text messages straight through.\n16. **Text Summarizer** *(text branch)* \u2014 LangChain chain (using Google Gemini Chat Model2) that summarizes the user's text message.\n17. **Get User's Message** \u2014 Merges message type, text/description, sender, and any caption into one record, regardless of which branch it came from.\n18. **AI Agent** \u2014 Answers the user's question as a general-knowledge WhatsApp assistant, using Window Buffer Memory for context, Google Gemini Chat Model to reason, and Wikipedia as a lookup tool.\n19. **Window Buffer Memory** \u2014 Keeps a per-user conversation window, keyed by phone number.\n20. **Wikipedia** \u2014 Tool the agent can call for factual lookups.\n21. **Google Gemini Chat Model** \u2014 LLM backing the AI Agent.\n22. **Respond to User** \u2014 Sends the AI Agent's reply back to the sender over WhatsApp.\n\n---\n\n## Setup (~15 minutes)\n\n1. **WhatsApp Business API** \u2014 Add your credentials in *WhatsApp Trigger*, *Get Audio URL*, *Get Video URL*, *Get Image URL*, *Download Audio*, *Download Video*, *Download Image*, and *Respond to User*; set your phone number ID in *Respond to User*.\n2. **Google Gemini (PaLM) API** \u2014 Add your key in *Google Gemini Audio*, *Google Gemini Video*, *Google Gemini Chat Model*, *Google Gemini Chat Model1*, and *Google Gemini Chat Model2*.\n> Media (audio/video/image) is sent to Gemini as inline base64 data \u2014 large files may hit request size limits."
      },
      "typeVersion": 1
    },
    {
      "id": "18a4c2ba-0842-471e-97a9-1893b19101e4",
      "name": "Section 1 - Trigger & Message Routing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2256,
        528
      ],
      "parameters": {
        "color": 5,
        "width": 880,
        "height": 488,
        "content": "## 1\ufe0f\u20e3 Trigger & Message Routing\n\nThe **WhatsApp Trigger** receives every incoming message. **Split Out Message Parts** breaks the payload into individual items, and **Redirect Message Types** inspects each one to route it down an Audio, Video, Image, or Text path depending on what the user sent."
      },
      "typeVersion": 1
    },
    {
      "id": "0abcff68-8b86-4720-86ed-40a59bcd0676",
      "name": "Section 2 - Media Retrieval",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        112
      ],
      "parameters": {
        "color": 6,
        "width": 552,
        "height": 1424,
        "content": "## 2\ufe0f\u20e3 Media Retrieval\n\nFor non-text messages, **Get Audio URL**, **Get Video URL**, and **Get Image URL** fetch the WhatsApp media's downloadable link, and **Download Audio**, **Download Video**, and **Download Image** pull down the actual file. **Get Text** passes plain text messages straight through with no download needed."
      },
      "typeVersion": 1
    },
    {
      "id": "38cd97d7-09c3-4e41-ba45-086c84e5f2be",
      "name": "Section 3 - Multimodal Transcription & Summarization",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        96
      ],
      "parameters": {
        "color": 3,
        "width": 820,
        "height": 1580,
        "content": "## 3\ufe0f\u20e3 Multimodal Transcription & Summarization\n\nEach media type gets converted to text: **Google Gemini Audio** transcribes voice notes, **Google Gemini Video** describes video content, and **Image Explainer** (backed by **Google Gemini Chat Model1**) describes images and reads any visible text. **Text Summarizer** (backed by **Google Gemini Chat Model2**) condenses plain text messages. **Format Response** and **Format Response1** extract the plain text from Gemini's raw output before **Get User's Message** merges everything \u2014 type, text, sender, and caption \u2014 into one record."
      },
      "typeVersion": 1
    },
    {
      "id": "13decb5f-7a9f-4644-86d3-18ad94c4caf1",
      "name": "Section 4 - AI Agent & Response",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        688
      ],
      "parameters": {
        "color": 4,
        "width": 860,
        "height": 572,
        "content": "## 4\ufe0f\u20e3 AI Agent & Response\n\nThe **AI Agent** answers the user's question as a general-knowledge WhatsApp assistant, drawing on **Window Buffer Memory** for per-user conversation history, **Google Gemini Chat Model** for reasoning, and **Wikipedia** for factual lookups. **Respond to User** sends the reply back over WhatsApp."
      },
      "typeVersion": 1
    },
    {
      "id": "9e477118-37b6-458f-8514-ceb9b7b278c5",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        -2160,
        736
      ],
      "parameters": {
        "options": {},
        "updates": [
          "messages"
        ]
      },
      "typeVersion": 1
    },
    {
      "id": "0d2a8260-c60b-4114-8c35-8b498b9cb199",
      "name": "Get Audio URL",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -1072,
        336
      ],
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.audio.id }}"
      },
      "typeVersion": 1
    },
    {
      "id": "818096a9-89aa-4fe0-bdf8-51a4b00b0f06",
      "name": "Get Video URL",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -1072,
        704
      ],
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.video.id }}"
      },
      "typeVersion": 1
    },
    {
      "id": "deb30b3a-2516-448d-abe8-650f1422a03b",
      "name": "Get Image URL",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -1072,
        1040
      ],
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.image.id }}"
      },
      "typeVersion": 1
    },
    {
      "id": "805d3ab9-85c3-4102-a11d-7656c6ff400e",
      "name": "Download Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -912,
        704
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "whatsAppApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "3a319187-db77-4aca-adbe-9de889df7a00",
      "name": "Download Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -912,
        336
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "whatsAppApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "0ad95cdd-e566-47fd-af2c-967e01793b2c",
      "name": "Download Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -912,
        1040
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "whatsAppApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "3b72cd78-4aa6-4cb9-a5e9-741c08c87ac9",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        576,
        1056
      ],
      "parameters": {
        "sessionKey": "=whatsapp-tutorial-{{ $json.from }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.2
    },
    {
      "id": "ccf376bb-90b3-4dcd-b7d9-9a9acaabacd4",
      "name": "Get User's Message",
      "type": "n8n-nodes-base.set",
      "position": [
        384,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d990cbd6-a408-4ec4-a889-41be698918d9",
              "name": "message_type",
              "type": "string",
              "value": "={{ $('Split Out Message Parts').item.json.type }}"
            },
            {
              "id": "23b785c3-f38e-4706-80b7-51f333bba3bd",
              "name": "message_text",
              "type": "string",
              "value": "={{ $json.text }}"
            },
            {
              "id": "6e83f9a7-cf75-4182-b2d2-3151e8af76b9",
              "name": "from",
              "type": "string",
              "value": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}"
            },
            {
              "id": "da4b602a-28ca-4b0d-a747-c3d3698c3731",
              "name": "message_caption",
              "type": "string",
              "value": "={{ $('Redirect Message Types').item.json.video && $('Redirect Message Types').item.json.video.caption || '' }}\n{{ $('Redirect Message Types').item.json.image && $('Redirect Message Types').item.json.image.caption || ''}}\n{{ $('Redirect Message Types').item.json.audio && $('Redirect Message Types').item.json.audio.caption || ''}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "51daa48b-0170-4c3a-ad6f-50e1859668c3",
      "name": "Split Out Message Parts",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1920,
        736
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "messages"
      },
      "typeVersion": 1
    },
    {
      "id": "c9170ef3-3855-48f9-853c-876b641620ed",
      "name": "Wikipedia",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "position": [
        688,
        1056
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5d659385-e637-49be-bd1b-98d580128a36",
      "name": "Redirect Message Types",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1616,
        768
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Audio Message",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.type == 'audio' && Boolean($json.audio) }}",
                    "rightValue": "audio"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Video Message",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "82aa5ff4-c9b6-4187-a27e-c7c5d9bfdda0",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.type == 'video' && Boolean($json.video) }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Image Message",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "05b30af4-967b-4824-abdc-84a8292ac0e5",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.type == 'image' && Boolean($json.image) }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Text Message"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "a3963686-fec6-4e6f-b3c9-54a4cd0e01be",
      "name": "Get Text",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1072,
        1344
      ],
      "parameters": {
        "amount": 0
      },
      "typeVersion": 1.1
    },
    {
      "id": "f4faaef3-cd66-4380-8e23-541904a4f465",
      "name": "Respond to User",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        928,
        976
      ],
      "parameters": {
        "textBody": "={{ $json.output }}",
        "operation": "send",
        "phoneNumberId": "477115632141067",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}"
      },
      "typeVersion": 1
    },
    {
      "id": "40650e1b-c073-44e7-81e9-0b256d48ea57",
      "name": "Image Explainer",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -384,
        1040
      ],
      "parameters": {
        "text": "Here is an image sent by the user. Describe the image and transcribe any text visible in the image.",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.4
    },
    {
      "id": "8c614bd4-4010-49e3-933b-fa0b3a95f38c",
      "name": "Format Response",
      "type": "n8n-nodes-base.set",
      "position": [
        -224,
        704
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2ec0e573-373b-4692-bfae-86b6d3b9aa9a",
              "name": "text",
              "type": "string",
              "value": "={{ $json.candidates[0].content.parts[0].text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a39cc3ed-264f-42bb-9d25-acf86e4b2e45",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        432,
        1056
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-pro-002"
      },
      "typeVersion": 1
    },
    {
      "id": "7b937a6d-915a-4d96-af66-34e28815b636",
      "name": "Google Gemini Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -464,
        336
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-002:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={{\n{\n \"contents\": [{\n \"parts\":[\n {\"text\": \"Transcribe this audio\"},\n {\"inlineData\": {\n \"mimeType\": `audio/${$binary.data.fileExtension}`,\n \"data\": $input.item.binary.data.data }\n }\n ]\n }]\n}\n}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "googlePalmApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "486e4f8a-57b5-4aba-9365-d8d0ca7a82aa",
      "name": "Google Gemini Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -464,
        704
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-002:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={{\n{\n \"contents\": [{\n \"parts\":[\n {\"text\": \"Describe this video\"},\n {\"inlineData\": {\n \"mimeType\": `video/${$binary.data.fileExtension}`,\n \"data\": $input.item.binary.data.data }\n }\n ]\n }]\n}\n}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "googlePalmApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "1befbae7-3d2b-4e89-8a97-0fec791f24d2",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -416,
        1184
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-pro-002"
      },
      "typeVersion": 1
    },
    {
      "id": "4839ee89-20cf-4abc-9c17-071248dd2d44",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -416,
        1488
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-pro-002"
      },
      "typeVersion": 1
    },
    {
      "id": "4e2a8b65-d328-4820-bcef-235562accd25",
      "name": "Format Response1",
      "type": "n8n-nodes-base.set",
      "position": [
        -224,
        336
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2ec0e573-373b-4692-bfae-86b6d3b9aa9a",
              "name": "text",
              "type": "string",
              "value": "={{ $json.candidates[0].content.parts[0].text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "61feff06-9667-444f-9740-ed7e6af5cba6",
      "name": "Text Summarizer",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -384,
        1344
      ],
      "parameters": {
        "text": "={{ $json.text.body || $json.text }}",
        "messages": {
          "messageValues": [
            {
              "message": "Summarize the user's message succinctly."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.4
    },
    {
      "id": "2928fd5f-4876-4b6c-9ad8-1a4ae7d6a6b4",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        560,
        880
      ],
      "parameters": {
        "text": "=The user sent the following message\nmessage type: {{ $json.message_type }}\nmessage text or description:\n```{{ $json.message_text }}```\n{{ $json.message_caption ? `message caption: ${$json.message_caption.trim()}` : '' }}",
        "options": {
          "systemMessage": "You are a general knowledge assistant made available to the public via whatsapp. Help answer the user's query succiently and factually."
        },
        "promptType": "define"
      },
      "typeVersion": 1.6
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "23e7dc24-1c7c-4f7c-badf-47e47caa11e9",
  "nodeGroups": [],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Text": {
      "main": [
        [
          {
            "node": "Text Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Audio URL": {
      "main": [
        [
          {
            "node": "Download Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image URL": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video URL": {
      "main": [
        [
          {
            "node": "Download Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Audio": {
      "main": [
        [
          {
            "node": "Google Gemini Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Image Explainer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Video": {
      "main": [
        [
          {
            "node": "Google Gemini Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Response": {
      "main": [
        [
          {
            "node": "Get User's Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Explainer": {
      "main": [
        [
          {
            "node": "Get User's Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Summarizer": {
      "main": [
        [
          {
            "node": "Get User's Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Response1": {
      "main": [
        [
          {
            "node": "Get User's Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "Split Out Message Parts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User's Message": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Audio": {
      "main": [
        [
          {
            "node": "Format Response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Video": {
      "main": [
        [
          {
            "node": "Format Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Redirect Message Types": {
      "main": [
        [
          {
            "node": "Get Audio URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Video URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Image URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Message Parts": {
      "main": [
        [
          {
            "node": "Redirect Message Types",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Image Explainer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Text Summarizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow auto-replies to incoming WhatsApp messages (text, audio, video, or images) by downloading any media, converting it to text with Google Gemini, and generating a concise answer with a Gemini-powered agent that can use Wikipedia for factual lookups. Triggers when a…

Source: https://n8n.io/workflows/17437/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

48_WAgentEnhancement. Uses whatsAppTrigger, whatsApp, openAi, httpRequest. Event-driven trigger; 56 nodes.

WhatsApp Trigger, WhatsApp, OpenAI +13
AI & RAG

WhatsApp AI Assistant for Clinic Appointment Booking Automate your entire appointment lifecycle with an intelligent AI assistant that lives on WhatsApp. This workflow empowers any clinic or independen

Google Gemini Chat, WhatsApp Trigger, Memory Buffer Window +9
AI & RAG

Powertech Whatsapp. Uses whatsAppTrigger, whatsApp, httpRequest, googleGemini. Event-driven trigger; 36 nodes.

WhatsApp Trigger, WhatsApp, HTTP Request +8
AI & RAG

Wait Splitout. Uses whatsAppTrigger, whatsApp, httpRequest, memoryBufferWindow. Event-driven trigger; 35 nodes.

WhatsApp Trigger, WhatsApp, HTTP Request +5
AI & RAG

Wait Splitout. Uses whatsAppTrigger, whatsApp, httpRequest, memoryBufferWindow. Event-driven trigger; 35 nodes.

WhatsApp Trigger, WhatsApp, HTTP Request +5