AutomationFlowsAI & RAG › Whatsapp Test

Whatsapp Test

Whatsapp Test. Uses whatsAppTrigger, agent, lmChatOpenAi, memoryBufferWindow. Event-driven trigger; 8 nodes.

Event trigger★★★☆☆ complexityAI-powered8 nodesWhatsApp TriggerAgentOpenAI ChatMemory Buffer WindowWhatsAppTool CalculatorTool WikipediaGmail Tool
AI & RAG Trigger: Event Nodes: 8 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the Agent → Gmail Tool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Whatsapp Test",
  "nodes": [
    {
      "parameters": {
        "updates": [
          "messages"
        ],
        "options": {}
      },
      "type": "n8n-nodes-base.whatsAppTrigger",
      "typeVersion": 1,
      "position": [
        -60,
        -20
      ],
      "id": "3e10588e-80f3-4247-8618-2e1c2547707b",
      "name": "WhatsApp Trigger",
      "credentials": {
        "whatsAppTriggerApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.messages[0].text.body }}",
        "options": {
          "systemMessage": "=**Role**  \nYou are a **personal assistant** designed to help users manage tasks efficiently.  \n\n## **Capabilities**  \nYou have access to the following tools:  \n- **Send_Mail** \u2192 Use this tool to send well-formatted emails with a proper greeting and closing.  \n- **Wikipedia** \u2192 Use this tool to look up general knowledge and factual information.  \n\n## **Behavior**  \n- You respond **clearly, concisely, and professionally**, while maintaining a friendly tone.  \n- When sending emails, ensure they are **well-structured and polite**. Also sign off by name \"Vashi\" (Ex. Best Regards, Vashi)  \n- If a user asks a factual question, check **Wikipedia** before responding.  \n- If a request is unclear, ask for clarification before proceeding.  \n\n## **Restrictions**  \n- Only use **Send_Mail** for sending emails, not for internal communication.  \n- Do not generate responses based on assumptions; always verify with Wikipedia when relevant.  \n\n## time and date: {{ $now }}\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        160,
        -20
      ],
      "id": "a91f6161-83da-4c8b-a7d9-04cbf84212ed",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        100,
        200
      ],
      "id": "629ab58b-41b1-45b3-96c6-5d0f1915eae7",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('WhatsApp Trigger').item.json.contacts[0].wa_id }}",
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        220,
        200
      ],
      "id": "947ee553-7e0f-49e4-8ca6-2371635e2bff",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "operation": "send",
        "phoneNumberId": "704234116096220",
        "recipientPhoneNumber": "+918734828921",
        "textBody": "={{ $json.output }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.whatsApp",
      "typeVersion": 1,
      "position": [
        520,
        -20
      ],
      "id": "78dcdb57-593c-4e8f-ac79-4ac712a22e8b",
      "name": "WhatsApp Business Cloud",
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "typeVersion": 1,
      "position": [
        360,
        200
      ],
      "id": "fd6f905c-a9cd-47ee-8cc2-e3d76b8db926",
      "name": "Calculator"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "typeVersion": 1,
      "position": [
        480,
        200
      ],
      "id": "4c867c86-0d71-40ef-85ac-018f1f73ed99",
      "name": "Wikipedia"
    },
    {
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "emailType": "text",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmailTool",
      "typeVersion": 2.1,
      "position": [
        600,
        200
      ],
      "id": "f6a4080f-3e07-404a-ad0f-a7e5396e8649",
      "name": "Gmail",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "WhatsApp Business Cloud",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "387bcc23-cbeb-4be4-9be9-0f2ed4aee374",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "1J0dq1PJK8muusWA",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Whatsapp Test. Uses whatsAppTrigger, agent, lmChatOpenAi, memoryBufferWindow. Event-driven trigger; 8 nodes.

Source: https://github.com/VashishthSoni/AI-Automation-Workflows-n8n-make.com/blob/c2b5860c8bfd9a32c3775208faf9b18e374f9ead/n8n/Whatsapp_bot.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow turns WhatsApp into a smart email command center using AI.

Agent, Gmail Tool, OpenAI Chat +6
AI & RAG

Whatsapp Ai Agent. Uses whatsAppTrigger, whatsApp, httpRequest, openAi. Event-driven trigger; 23 nodes.

WhatsApp Trigger, WhatsApp, HTTP Request +7
AI & RAG

Streamline restaurant reservations on WhatsApp

WhatsApp, WhatsApp Trigger, Agent +5
AI & RAG

How it works • Transcribes a WhatsApp voice or text message from a prospect using Whisper or GPT • Extracts key information (name, need, context, urgency) via AI • Matches the most relevant service pa

OpenAI Chat, WhatsApp Trigger, HTTP Request +7
AI & RAG

48_WAgentEnhancement. Uses whatsAppTrigger, whatsApp, openAi, httpRequest. Event-driven trigger; 56 nodes.

WhatsApp Trigger, WhatsApp, OpenAI +13