{"product_id":"whatsapp-memory-aware-chatbot-workflow-n8n-openrouter-gpt-4-1","title":"WhatsApp Memory-Aware Chatbot Workflow (n8n + OpenRouter GPT-4.1)","description":"\u003ch3\u003eTurn WhatsApp chats into memory-aware conversations with n8n + OpenRouter (GPT-4.1)\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003eWhatsApp Memory-Aware Chatbot Workflow\u003c\/strong\u003e listens for incoming WhatsApp messages, retrieves each sender’s saved chat memory from an \u003cstrong\u003en8n Data Table\u003c\/strong\u003e, generates a thoughtful reply using an \u003cstrong\u003eOpenRouter GPT‑4.1 agent\u003c\/strong\u003e, and then sends the response back on WhatsApp—optionally saving new facts for future context.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers on new WhatsApp messages\u003c\/strong\u003e via the WhatsApp trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSplits incoming payload items\u003c\/strong\u003e and routes only \u003cstrong\u003etext messages\u003c\/strong\u003e for processing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLoads sender-specific chat history\u003c\/strong\u003e from an \u003cstrong\u003en8n Data Table\u003c\/strong\u003e and aggregates prior messages into a chat-memory list.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls an OpenRouter (GPT‑4.1) agent\u003c\/strong\u003e with the user’s text plus the aggregated memory to generate a reply.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptionally stores new “memory” entries\u003c\/strong\u003e extracted by the agent back into the Data Table (sender, recipient, summary, timestamp).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the generated response back to the user\u003c\/strong\u003e using the WhatsApp Cloud API send step.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCustomer support where the assistant remembers prior requests and context per WhatsApp sender.\u003c\/li\u003e\n  \u003cli\u003eLead qualification chats that retain key facts (e.g., preferences or answers) for follow-up messages.\u003c\/li\u003e\n  \u003cli\u003eInternal ops or SaaS notifications where agents maintain a lightweight conversation history.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes:\u003c\/strong\u003e set, switch, split out, WhatsApp (trigger + send), aggregate, data table.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eModel:\u003c\/strong\u003e OpenRouter GPT‑4.1 agent for reply generation and memory extraction.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMemory storage:\u003c\/strong\u003e an n8n Data Table with columns for \u003cem\u003esender, recipient, message, created_at\u003c\/em\u003e (and updated with extracted memory entries as configured).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWhatsApp integration:\u003c\/strong\u003e requires WhatsApp Cloud API credentials for both trigger and send nodes, plus correct mapping of the recipient WhatsApp ID and your WhatsApp \u003cstrong\u003ePhone Number ID\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46146393473203,"sku":"N8N-20227","price":52.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/DdERiAdx7YnrSTJWyemIY_3dwdx8wG.png?v=1790846596","url":"https:\/\/buyflowscripts.com\/products\/whatsapp-memory-aware-chatbot-workflow-n8n-openrouter-gpt-4-1","provider":"N8N Commerce","version":"1.0","type":"link"}