Build a robust WhatsApp AI assistant with this advanced n8n workflow. It handles text, audio, images, and documents using GPT-4o, Redis queuing, and PostgreSQL memory. Get started with n8n templates today.
Download this n8n workflow template and start using it instantly.
• Users needing advanced, stateful WhatsApp business automation.
• Developers looking for comprehensive n8n templates for AI agents.
• Businesses requiring a reliable WhatsApp bot that handles various media types (text, audio, image).
• Anyone operating an n8n installation requiring Redis and PostgreSQL integration for enhanced functionality.
Developing a reliable chat assistant often struggles with handling rapid user inputs (message queuing) and complex media types. This sophisticated n8n workflow solves both problems by integrating multiple powerful services. It utilizes the Evolution API for WhatsApp connectivity, Redis for implementing a crucial 10-second message queuing mechanism, and PostgreSQL for persistent chat memory, ensuring long, context-aware conversations.
The core of the system is the AI Agent, powered by the latest GPT-4o model, capable of transcribing audio, analyzing images, extracting information from documents, and generating context-aware responses. Furthermore, the final stage includes a specialized Format Response step, which uses a secondary AI call to ensure that lengthy generated replies are automatically broken down into multiple, naturally delayed, WhatsApp-optimized messages. This high-performance n8n node configuration ensures professionalism and efficiency, making it one of the most powerful n8n templates available for customer engagement.
This comprehensive n8n workflow initiates when the Receive WhatsApp n8n trigger receives a webhook from the Evolution API.
ALLOWED_NUMBER list, and immediately mark the message as read via the Evolution API n8n node.Route by Message Type n8n node directs the message flow based on its type (text, audio, image, document). Media types are converted from Base64 and processed by dedicated OpenAI n8n nodes (e.g., audio is transcribed via Whisper, images and documents are analyzed using GPT-4o Vision). The content is then unified into a single input format.Queue Message) using the recipient's JID as the key. A 10-second pause (Wait for More Messages) allows for message batching. The flow proceeds only if the current message is the final item received within that window, preventing the AI from responding prematurely to fragmented user input.AI Agent n8n node, which maintains conversation state using the Postgres Chat Memory n8n node and generates a response using GPT-4o-mini.Split Messages n8n node iterates over the response array. Messages are sent sequentially using the Evolution API n8n node, with a message-length-dependent delay applied to simulate natural typing speed. Finally, the Redis queue is cleared using a Redis n8n node.To deploy this powerful n8n workflow, follow these setup steps:
n8n-nodes-evolution-api.whatsappchatmemory table exists).Receive WhatsApp n8n trigger. Copy the generated webhook URL.MESSAGESUPSERT event.YOUR[email protected] placeholder in the Filter Allowed Numbers n8n node with the number(s) you wish to allow to interact with the bot. Receive WhatsApp (Webhook n8n trigger): Serves as the primary entry point, listening for incoming WhatsApp messages from the Evolution API on the specified path whatsapp-multimodal.
Evolution API n8n node (Mark as Read): Immediately interacts with the WhatsApp chat API to mark the incoming message as viewed, enhancing user experience.
Route by Message Type (Switch n8n node): Determines the type of message (conversation, audioMessage, imageMessage, documentMessage) and routes the flow accordingly for specialized processing.
OpenAI n8n node (Transcribe Audio): Uses the Whisper model to transcribe voice messages into text, integrating multimodal capability into the n8n workflow.
OpenAI n8n node (Analyze Image/Document): Utilizes GPT-4o Vision to analyze the content of image and document files attached to the message, converting visual data into descriptive text for the AI.
Redis n8n node (Queue Message / Get Queued Messages): Manages concurrent messages by temporarily storing input based on the remoteJid, acting as a crucial flow control mechanism in this n8n workflow.
If n8n node (Is Last Message?): Checks if the currently processing message is the last one received within the defined 10-second queue window, ensuring the bot responds only when the user's thought process is complete.
AI Agent n8n node: The core intelligence node. It orchestrates the LLM (gpt-4o-mini) and leverages the Postgres Chat Memory n8n node to maintain long-term conversational context.
Chain LLM n8n node (Format Response): This specialized n8n node uses a system prompt and a structured output parser to automatically segment long AI responses into WhatsApp-friendly message chunks.
Evolution API n8n node (Send Text): Sends the final, segmented responses back to the user, incorporating a dynamic delay parameter in the n8n node configuration for realistic typing simulation.
Automate weekly AI trend analysis using an n8n workflow. Scrape arXiv, classify papers with LLMs, embed them in Weaviate, and use an n8n agentic RAG system to generate and email a concise trend report.

Build a sophisticated AI voice chatbot using this powerful n8n workflow. It combines ElevenLabs for voice functionality, an n8n Agent for routing, and multiple InfraNodus Graph RAG experts for specialized knowledge retrieval. Get started with n8n templates.

Build a versatile conversational AI Telegram bot using this advanced n8n workflow. Integrate Telegram with Google Gemini 2.5 Flash for intelligent text responses, image analysis, and full conversation memory using this robust n8n template.

Build an intelligent WhatsApp assistant using this complex n8n workflow. Integrate RAG memory (MongoDB), Google Suite, research tools, and AI image generation in one powerful n8n automation.









































