n8n workflow template · 24 nodes · WhatsApp Business Cloud
Respond to WhatsApp Messages with AI Like a Pro! is a free n8n workflow template that starts from the WhatsApp Business Cloud Trigger node and works with WhatsApp Business Cloud, Wikipedia and Google Gemini. It has 24 nodes, 8 of them AI nodes (Window Buffer Memory, Wikipedia Tool, Basic LLM Chain and Google Gemini Chat Model). The notes inside the workflow say: “Join the Discord or ask in the Forum!” To run it, you add your own credentials for Google Gemini (PaLM) API, Whats App Trigger API and WhatsApp Business Cloud API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Join the Discord or ask in the Forum!
You must activate the workflow to use this WhatsApp Chabot. If you are self-hosting, ensure WhatsApp is able to connect to your server.
Learn more about the WhatsApp Trigger
To start receiving WhatsApp messages in your workflow, there are quite a few steps involved so be sure to follow the n8n documentation. When we recieve WhatsApp messages, we'll split out the messages part of the payload and handle them depending on the message type using the Switch node.
For audio messages or voice notes, we can use GPT4o to transcribe the message for our AI Agent.
For video messages, one approach is to use a Multimodal Model that supports parsing video. Currently, Google Gemini is a well-tested service for this task. We'll need to use the HTTP request node as currrently n8n's LLM node doesn't currently support video binary types.
For image messages, we can use GPT4o to explain what is going on in the message for our AI Agent.
For text messages, we don't need to do much transformation but it's nice to summarize for easier understanding.
Not using Gemini? Feel free to swap this out for any Multimodal Model that supports Audio.
Not using Gemini? Feel free to swap this out for any Multimodal Model that supports Video.
Read more about the Whatsapp node
To close out this demonstration, we'll simple send a simple text message back to the user. Note that this WhatsApp node also allows you to send images, audio, videos, documents as well as location!
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Read more about the AI Agent node
Now that we'll able to handle all message types from WhatsApp, we could do pretty much anything we want with it by giving it our AI agent. Examples could include handling customer support, helping to book appointments or verifying documents.
In this demonstration, we'll just create a simple AI Agent which responds to our WhatsApp user's message and returns a simple response.
The 24 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us