{"product_id":"n8n-whatsapp-webhook-ai-reply-wafly-openai-agent","title":"n8n WhatsApp Webhook AI Reply: Wafly + OpenAI Agent","description":"\u003ch3\u003eTurn WhatsApp questions into instant, AI-powered replies (with per-contact memory)\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens for incoming WhatsApp messages from \u003cstrong\u003eWafly\u003c\/strong\u003e, groups rapid-fire questions into one clean prompt (optionally transcribes voice notes), then uses an \u003cstrong\u003eOpenAI-powered agent\u003c\/strong\u003e with \u003cstrong\u003eper-phone-number memory\u003c\/strong\u003e to generate a short reply and send it back to the customer.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives WhatsApp webhooks\u003c\/strong\u003e through an n8n webhook endpoint exposed by the workflow.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes the payload\u003c\/strong\u003e so either typed text or a voice-note transcription becomes a single \u003ccode\u003equestion\u003c\/code\u003e field.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFilters non-customer events\u003c\/strong\u003e, including echoes from your own number, group messages, and empty messages—so the AI only responds to real customer input.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuffers rapid-fire messages\u003c\/strong\u003e to combine multiple messages into one question before calling the AI agent.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls an OpenAI chat model\u003c\/strong\u003e via an AI agent and uses a \u003cstrong\u003ememory window keyed to the customer’s phone number\u003c\/strong\u003e to maintain context.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the generated response\u003c\/strong\u003e back to the customer as a WhatsApp text message using \u003cstrong\u003eWafly\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS support: answer repeated questions like pricing, setup steps, or troubleshooting without manual typing.\u003c\/li\u003e\n  \u003cli\u003eLead qualification: respond to incoming WhatsApp inquiries while maintaining context per contact.\u003c\/li\u003e\n  \u003cli\u003eSales \u0026amp; onboarding: handle multi-message questions as one consolidated request.\u003c\/li\u003e\n  \u003cli\u003eVoice note handling: turn voice notes into text (optional) and reply automatically.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSelf-host required:\u003c\/strong\u003e install the community node \u003ccode\u003en8n-nodes-wafly\u003c\/code\u003e (this template does not work on n8n Cloud).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Wafly webhook + Wafly sending; OpenAI API for the chat agent response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWorkflow logic nodes:\u003c\/strong\u003e \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003eno op\u003c\/code\u003e, plus \u003ccode\u003en8n-nodes-wafly\u003c\/code\u003e and supporting nodes (e.g., sticky note for guidance).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup steps:\u003c\/strong\u003e configure Wafly credentials, add OpenAI credentials, run the manual buffering sequence, and register the workflow webhook URL with Wafly.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45748944306355,"sku":"N8N-17700","price":43.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/MWn2hO-an_OkjC2a_cNXd_1uY5ppL7.png?v=1785575175","url":"https:\/\/buyflowscripts.com\/products\/n8n-whatsapp-webhook-ai-reply-wafly-openai-agent","provider":"N8N Commerce","version":"1.0","type":"link"}