Erstellung eines WhatsApp-KI-Assistenten mit Llama-4 und Google-Suche-Erkenntnissen
Dies ist ein Support Chatbot, AI Chatbot-Bereich Automatisierungsworkflow mit 12 Nodes. Hauptsächlich werden Set, Switch, WhatsApp, Agent, WhatsAppTrigger und andere Nodes verwendet. Erstelle einen WhatsApp-KI-Assistenten mit LLaMA 4 und Google Search Insights
- •Keine besonderen Voraussetzungen, sofort nach Import nutzbar
Verwendete Nodes (12)
Kategorie
{
"id": "qnJHaFyEszx8iwZH",
"meta": {
"instanceId": "9c8f658dbece48b519a8ad7757c7d7db7a30c5f3fd29c9dc8afae32fe0c7711a",
"templateCredsSetupCompleted": true
},
"name": "Create a WhatsApp AI Assistant with Llama-4 and Google Search Insights",
"tags": [],
"nodes": [
{
"id": "9e6a8db0-cc1f-44b9-871e-f5f1e1929368",
"name": "KI-Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
640,
0
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "=You are Seventeen, a friendly and helpful AI assistant created by Manav. \nYou speak in casual AAVE (American tone) with a light sarcastic vibe. \n\nAlternate your greetings (e.g., “yo, what’s poppin’?”, “hey, what’s goin’ on?”) so replies don’t feel repetitive. \nYou are currently talking to {{ $('WhatsApp Trigger').item.json.contacts[0].profile.name }}. \nThe current date and time is {{ $now.toISO() }}. \n\nAvoid writing “G’” at the start of sentences. Keep responses casual but clear.\n"
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "7f6ef649-57e5-43ae-bf8f-1646a0663089",
"name": "Groq Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
576,
240
],
"parameters": {
"model": "meta-llama/llama-4-scout-17b-16e-instruct",
"options": {}
},
"credentials": {
"groqApi": {
"id": "3Evg0USLHEyRNZzx",
"name": "Groq account"
}
},
"typeVersion": 1
},
{
"id": "71626a55-43af-4846-b401-d6ce65d9193c",
"name": "Haftnotiz",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-512
],
"parameters": {
"color": 5,
"width": 192,
"height": 656,
"content": "## Node Guide: Input Switch\n\nThis node detects the **type of message** coming from WhatsApp (text or image) and sends it to the correct processing path in the workflow.\n\n- **Text messages** → Sent directly to the AI Agent. \n- **Image messages** → (Future use) Can be extended as per your requirements.\n\nThis helps ensure the workflow handles different input types smoothly.\n\n"
},
"typeVersion": 1
},
{
"id": "c83eb856-3032-436f-9460-4a3540464a01",
"name": "Haftnotiz2",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
-288
],
"parameters": {
"height": 448,
"content": "## Execution Logic\n\nThis part of the workflow activates **when a text message is detected**. \nIt prepares the message and sends it to the AI Agent node, which generates the reply. \n\nUse this node to **process text inputs only** (images or audio can be added later if needed).\n"
},
"typeVersion": 1
},
{
"id": "d26f1349-7997-4454-8a1f-2067ebc33570",
"name": "Haftnotiz3",
"type": "n8n-nodes-base.stickyNote",
"position": [
560,
-368
],
"parameters": {
"color": 5,
"width": 432,
"height": 528,
"content": "## Meet Your AI Agent\n\nThis chatbot runs on **Groq’s lightning-fast LLaMA 4 model** and delivers **real-time answers** through Google Search (SerpAPI).\n\n### How it works\n- Responds to **text messages** (images or audio can be added later). \n- Remembers your last **20 messages** for continuous context. \n- Searches Google when it needs fresh info (no outdated responses). \n- Designed to feel like you’re talking to a **real person** — fast, smart, and helpful.\n"
},
"typeVersion": 1
},
{
"id": "171ab986-4378-4975-bbee-255bde19c84b",
"name": "Hauptarbeitsablauf-Übersicht",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
-576
],
"parameters": {
"width": 656,
"height": 1168,
"content": "## WhatsApp AI Assistant with LLaMA 4 and Google Search\n\n#### This workflow creates a **real-time AI chatbot on WhatsApp** powered by Groq’s **LLaMA 4 model** with **Google Search (SerpAPI)** for fresh insights.\n\n---\n\n### Who’s it for\n- Users who want an AI assistant directly on WhatsApp. \n- Businesses needing real-time FAQ and support automation. \n- Anyone wanting a chatbot that remembers past messages and uses live search.\n\n---\n\n### What it does\n- Connects WhatsApp to **Groq’s LLaMA 4** model for AI responses. \n- Uses **SerpAPI** to fetch **real-time search results** from Google. \n- Maintains **context of the last 20 messages** for continuous conversations(you can increase in the AI agent). \n\n---\n\n### How it works\n1. A user sends a message to your WhatsApp number. \n2. The workflow checks if it’s **text** (images can be added later). \n3. Text is sent to the AI Agent, which uses Groq’s LLaMA 4 for responses. \n4. If real-time info is needed, SerpAPI fetches results from Google. \n5. The reply is composed and sent back to the user via WhatsApp.\n\n---\n\n### Requirements\n- **n8n** (cloud or self-hosted) \n- **WhatsApp Business API** or **Twilio sandbox** \n- **Groq API key** \n- **SerpAPI key** \n\n---\n\n### How to set up\n1. Import this workflow into your n8n instance. \n2. Configure **Groq**, **SerpAPI**, and **WhatsApp** credentials. \n3. Link your WhatsApp webhook to trigger this workflow. \n4. Activate and test by sending a WhatsApp message. \n\n---\n\n### How to customize\n- Change AI personality in the **AI Agent** node’s `systemMessage`. \n- Add extra features like **summarization, translation, or voice handling**. \n- Integrate logging or analytics for chatbot usage tracking.\n"
},
"typeVersion": 1
},
{
"id": "5d89108e-adb6-4b05-80dc-4aeedcd64639",
"name": "Routing basierend auf Eingabe",
"type": "n8n-nodes-base.switch",
"position": [
32,
-16
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Image",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "57d9036d-3a48-4c8a-b556-98a588d67842",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.messages[0].image }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fc815250-4b24-4554-8f03-3221eed44682",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.messages[0].text }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "60cf0325-bb4b-4e6a-9caa-21dd9c05fb51",
"name": "Google-Suche",
"type": "@n8n/n8n-nodes-langchain.toolSerpApi",
"position": [
912,
240
],
"parameters": {
"options": {}
},
"credentials": {
"serpApi": {
"id": "lJEWi2JA3u32XIG6",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "b585b12d-3c7b-4ed5-abb4-ba9ed14f45df",
"name": "Textaufforderung vorbereiten",
"type": "n8n-nodes-base.set",
"position": [
304,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "707e792c-1a14-4291-b9bc-e37a740eb5b7",
"name": "text",
"type": "string",
"value": "={{ $json.messages[0].text.body }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1a3a3c4d-a403-44b6-bb84-d62ddb4d1208",
"name": "Konversationsspeicher",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
752,
240
],
"parameters": {
"sessionKey": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}",
"sessionIdType": "customKey",
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "0c9fbba5-ef00-449c-baae-57a9a7628c3b",
"name": "WhatsApp-Antwort senden",
"type": "n8n-nodes-base.whatsApp",
"position": [
1072,
0
],
"webhookId": "53c1a722-1692-4bbd-983c-4dd884153d68",
"parameters": {
"textBody": "={{ $json.output }}",
"operation": "send",
"phoneNumberId": "768049963047541",
"additionalFields": {},
"recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.messages[0].from }}"
},
"credentials": {
"whatsAppApi": {
"id": "LV22R0NzX9vZLEp9",
"name": "whatsapp_reply"
}
},
"typeVersion": 1
},
{
"id": "49c92b8b-fd42-4119-97c5-68a424acc72d",
"name": "WhatsApp-Auslöser",
"type": "n8n-nodes-base.whatsAppTrigger",
"position": [
-176,
-16
],
"webhookId": "ec046705-b8f2-4b88-9b98-4fd99975f432",
"parameters": {
"options": {},
"updates": [
"messages"
]
},
"credentials": {
"whatsAppTriggerApi": {
"id": "yVPQQ9GPjNKE9nkZ",
"name": "whatsApp_OAuth_api"
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "1da5761e-3847-4206-a0dd-bfb831bc00ec",
"connections": {
"9e6a8db0-cc1f-44b9-871e-f5f1e1929368": {
"main": [
[
{
"node": "0c9fbba5-ef00-449c-baae-57a9a7628c3b",
"type": "main",
"index": 0
}
]
]
},
"60cf0325-bb4b-4e6a-9caa-21dd9c05fb51": {
"ai_tool": [
[
{
"node": "9e6a8db0-cc1f-44b9-871e-f5f1e1929368",
"type": "ai_tool",
"index": 0
}
]
]
},
"7f6ef649-57e5-43ae-bf8f-1646a0663089": {
"ai_languageModel": [
[
{
"node": "9e6a8db0-cc1f-44b9-871e-f5f1e1929368",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"49c92b8b-fd42-4119-97c5-68a424acc72d": {
"main": [
[
{
"node": "5d89108e-adb6-4b05-80dc-4aeedcd64639",
"type": "main",
"index": 0
}
]
]
},
"1a3a3c4d-a403-44b6-bb84-d62ddb4d1208": {
"ai_memory": [
[
{
"node": "9e6a8db0-cc1f-44b9-871e-f5f1e1929368",
"type": "ai_memory",
"index": 0
}
]
]
},
"b585b12d-3c7b-4ed5-abb4-ba9ed14f45df": {
"main": [
[
{
"node": "9e6a8db0-cc1f-44b9-871e-f5f1e1929368",
"type": "main",
"index": 0
}
]
]
},
"5d89108e-adb6-4b05-80dc-4aeedcd64639": {
"main": [
[],
[
{
"node": "b585b12d-3c7b-4ed5-abb4-ba9ed14f45df",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - Support-Chatbot, KI-Chatbot
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Manav Desai
@manavdesai17Exploring AI and automation with n8n. Here to share builds, learn from the community, and create useful workflows together.
Diesen Workflow teilen