GeminiCreativeWritingAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Build a WhatsApp AI Auto-Reply with n8n, WOZTELL, and Google Gemini

Route WhatsApp inbound messages into n8n via webhook, filter and fetch conversation context, generate replies with Gemini, and send back through WOZTELL

Some experienceStepsWorkflowPrompt
Who
Teams with an n8n instance, a WOZTELL WhatsApp channel, and a Gemini API key
You get
When a customer sends a WhatsApp text message, the system automatically generates a context-aware professional reply and sends it
You need
n8n

Constraints

Prerequisites: n8n account; WOZTELL account with WhatsApp Business API channel configured and message templates approved; Google Gemini API key. Costs: billed per WOZTELL and Gemini platform pricing. Limitations: handles TEXT messages only; ignores events where eventType is not inbound, type is not text, or liveChat is true. Conversation history reads up to 100 messages per source description, but maxResults is set to 10 in the template node.

What they did

Author krisatwoztell published an official n8n template connecting WOZTELL WhatsApp Business API to Google Gemini. The template receives WOZTELL inbound message events via Webhook, filters for text messages not in liveChat, fetches recent conversation history through WOZTELL's memberAPI, formats messages into labeled Customer/Agent blocks via Edit Fields, generates a reply via the AI Agent node with Gemini, and sends a TEXT message back to the customer through WOZTELL.

How it went

Source is an n8n official template (author_report) showing a complete importable workflow JSON with 15 nodes and explicit connections. Template description claims instant automated replies and reduced manual handling. This site has not tested actual runtime behavior.

Worth knowing

1) No standalone workflow JSON export is provided by the source; users must import via the n8n template marketplace. 2) WOZTELL WhatsApp Business API account requires business verification and approved message templates before messaging works. 3) The liveChat filter depends on correct Member Metadata mapping; misconfiguration silently drops all messages. 4) Edit Fields node sets maxResults to 10, which differs from the sticky note description of 'up to 100'. 5) The AI Agent systemMessage requires plain text output only; markdown or formatting symbols from Gemini may need downstream handling. 6) The credential type is googlePalmApi (legacy naming) but corresponds to the Gemini model.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Google Gemini Chat Model node: connect Google Gemini/PaLM API credentials.
  • Send responses node: connect woztellCredentialApi credentials.
  • Get conversation history by id1 node: connect woztellCredentialApi credentials.

Configuration to replace

  • Source template is n8n public workflow #13641 (~15 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-24

Steps

  1. Import the template

    In the n8n workflow editor, import template ID 13641 'Build an AI agent for WhatsApp with WOZTELL and Google Gemini'. After import, you will see nodes including Webhook, Filter, Get conversation history, Edit Fields, AI Agent, Google Gemini Chat Model, and Send responses.

  2. Configure the WOZTELL webhook

    Activate the workflow, then copy the Webhook node's Production URL and paste it into your WOZTELL inbound webhook settings. Under Event Subscriptions, select Inbound Messages. In the Member Metadata field, enter: Member Metadata: liveChat; Member Path: member.botMeta.liveChat.

    Setup guidance · Source text。WOZTELL inbound webhook configuration UI

    After activating this workflow, copy the **Production URL** and paste it into your WOZTELL inbound webhook settings.
    
    Check how to configure the webhook [here](https://support.woztell.com/portal/en/kb/articles/web#Create_Webhooks).
    
    Select **Inbound Messages** in the Event Subscriptions.
     
    In the Member Metadata field, fill in the following details:
    Member Metadata: **liveChat**
    Member Path: **member.botMeta.liveChat**
  3. Connect WOZTELL credentials and set history permissions

    Add a woztellCredentialApi credential in n8n. Generate a WOZTELL access token with these permissions: channel:list, channel:getBasicInfo, member:getConversations, bot:sendResponses, member:getDetails. If you already have a Channel API token, you may reuse it. The Get conversation history node defaults to maxResults of 10.

    Setup guidance · Source text。WOZTELL credential setup and access token generation guide

    Reads up to 100 messages for the account to provide context to the AI.
    
    Set up your WOZTELL credentials. To generate the access token, follow the step-by-step guide [here]( https://support.woztell.com/portal/en/kb/articles/access-token#Access_Token_Generation).
    
    Required permissions:
    - channel:list
    - channel:getBasicInfo
    - member:getConversations
    - bot:sendResponses
    - member:getDetails
    ###
    For the WOZTELL Channel API field, follow [this guide](https://support.woztell.com/portal/en/kb/articles/access-token-channels-in-woztell#How_to_Create_an_Access_Token_for_a_Channel_in_WOZTELL) to create a new token. If you have already generated a token, you may reuse it.
  4. Connect Google Gemini credentials

    Add a googlePalmApi credential in n8n and enter your Gemini API key. The AI Agent node calls the Google Gemini Chat Model sub-node with a default maxOutputTokens of 1000. You may adjust token limits or switch to another supported model.

    Setup guidance · Source text。Google Gemini credential configuration node note

    Google Gemini Chat Model provides the AI language model used to generate replies.
    
    Connect your Google Gemini API key. Follow the official n8n documentation [here](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglegemini/).
    
    You can adjust token limits or switch to another supported model if needed.
  5. Activate and test

    Activate the workflow. Send a text message to the WhatsApp number linked to WOZTELL. If eventType=inbound, type=text, and liveChat=false, the system retrieves conversation history, formats it, passes it to the AI Agent, generates a plain-text-only reply via Gemini, and sends it back through WOZTELL. Messages that fail the filter are silently ignored.

Prompt you can copy

Execution prompt · Source text。AI Agent node systemMessage field

This block is the prompt. Ads are never placed here.

You are a Professional Conversation Analyst and Reply Generator Agent. Analyze the provided conversation snippets. Generate a single, concise, and contextually appropriate reply that directly addresses the last [Customer] statement in a professional tone, (Output **ONLY the plain text** of the reply).

To adjust brand tone, edit the systemMessage above. To constrain reply style, add rules in the AI Agent options.

Source

Build an AI agent for WhatsApp with WOZTELL and Google Gemini · krisatwoztell · n8n.io · 2026-02-24

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related