Skip to main content

Respond to WhatsApp messages with AI like a pro!

Workflow preview

Workflow preview
100%
Respond to WhatsApp messages with AI like a pro! preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.whatsapptrigger, n8n-nodes-base.whatsapp, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.set, n8n-nodes-base.splitout, @n8n/n8n-nodes-langchain.toolwikipedia, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jimleuk.

Original n8n.io source

1.1 Workflow description

Title
Respond to WhatsApp messages with AI like a pro!
Workflow name
Respond to WhatsApp messages with AI like a pro!

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.
  • 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
  • Google Gemini for LLM. Gemini is used specifically because it can accept audio and video files whereas at time of writing, many other providers like OpenAI's GPT, do not.

Customising this workflow

  • For performance reasons, consider detecting large audio and video before sending to the LLM. Pre-processing such files may allow your agent to perform better.
  • Go beyond and create rich and engagement customer experiences by responding using images, audio and video instead of just text!

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 2 - Get Audio URL

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 3 - Get Video URL

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 4 - Get Image URL

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 5 - Download Video

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Download Audio

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Download Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.2

Block 9 - Get User's Message

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Split Out Message Parts

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 11 - Wikipedia

Type / Role
@n8n/n8n-nodes-langchain.toolWikipedia - toolWikipedia
Config choices
Version 1

Block 12 - Redirect Message Types

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Get Text

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 19 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Respond to User

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 22 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Image Explainer

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

Showing the first 24 of 35 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Respond to WhatsApp messages with AI like a pro!
Complexity advanced
Nodes 35
Categories Support Chatbot, AI Chatbot
Author Jimleuk
Published 17 Oct 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2466/2466.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Respond to WhatsApp messages with AI like a pro! do?

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

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.