This n8n template demonstrates the beginnings of building your own n8n-powered WhatsApp chatbot! Under the hood, utilise n8n's powerful AI features to handle different message types and use an AI agent to respond to the user. A powerful tool for any use-case!
How it works
- Incoming WhatsApp Trigger provides a way to get messages into the workflow.
- The message received is extracted and sent through 1 of 4 branches for processing.
- Each processing branch uses AI to analyse, summarize or transcribe the message so that the AI agent can understand it. The supported types are text, image, audio (voice notes) and video (no sound).
- The AI Agent is used to generate a response generally and uses a wikipedia tool for more complex queries.
- Finally, the response message is sent back to the WhatsApp user using the WhatsApp node.
How to use
Once you have setup and configured your WhatsApp account, you'll need to activate your workflow to start processing messages.
Good to know: Large media files may negatively impact workflow performance.
Requirements
- WhatsApp Buisness account
- OpenAI for LLM
Customising this workflow
- For performance reasons, consider processing audio and video using dedicated services.
- To handle videos with sound, you have 2 choices: use an LLM like Gemini which fully supports video processing (though video input is not currently supported in LLM node) or split the video into a image track and audio track and process separately. Good luck!
- Go beyond and create rich and engagement customer experiences by responding using images, audio and video instead of just text!