{"product_id":"n8n-whatsapp-faq-webhook-openai-fallback-by-keyword-matching","title":"n8n WhatsApp FAQ Webhook: OpenAI Fallback by Keyword Matching","description":"\u003ch3\u003eInstant WhatsApp FAQ replies with keyword matching—and a safe OpenAI fallback\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens to \u003cstrong\u003eWhatsApp Business Cloud API\u003c\/strong\u003e webhook events, matches incoming text messages to your FAQ list using \u003cstrong\u003ekeyword matching\u003c\/strong\u003e, and—when no direct match is found—uses an \u003cstrong\u003eOpenAI fallback\u003c\/strong\u003e that can only return results from \u003cem\u003eapproved FAQ IDs\u003c\/em\u003e before replying 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\u003eVerifies the webhook callback URL\u003c\/strong\u003e: Handles the Meta verification \u003cstrong\u003eGET\u003c\/strong\u003e request and returns \u003ccode\u003ehub.challenge\u003c\/code\u003e only when the provided verify token matches.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcesses incoming WhatsApp messages\u003c\/strong\u003e: Accepts webhook \u003cstrong\u003ePOST\u003c\/strong\u003e events, keeps only \u003cstrong\u003eincoming text messages\u003c\/strong\u003e, and ignores delivery\/read receipts.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAnswers via keyword-matched FAQs\u003c\/strong\u003e: Scores each message against a built-in FAQ list and selects the highest-scoring FAQ answer when a match is found.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses OpenAI when no keyword match exists\u003c\/strong\u003e: Sends the customer message plus the available FAQ IDs\/questions to an OpenAI chat model to select a single FAQ ID or \u003ccode\u003enull\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEnsures safe output\u003c\/strong\u003e: Validates the model’s result against known FAQ IDs and replies with the stored answer—or a fixed fallback message—if no valid selection is made.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the reply back on WhatsApp\u003c\/strong\u003e: Uses the \u003cstrong\u003esame phone number\u003c\/strong\u003e that received the original message.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCustomer support for SaaS operators needing fast WhatsApp responses to common questions.\u003c\/li\u003e\n  \u003cli\u003eFAQ-driven lead qualification where users ask about pricing, availability, or features.\u003c\/li\u003e\n  \u003cli\u003eTeams that want deterministic keyword FAQ behavior, with OpenAI as a controlled “no-match” resolver.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWhatsApp Business Cloud API\u003c\/strong\u003e: Webhook verification and message reply handling.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\u003c\/strong\u003e: \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003erespond to webhook\u003c\/code\u003e, and workflow notes via \u003ccode\u003esticky note\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI \/ OpenAI-compatible model\u003c\/strong\u003e: Used only for FAQ ID selection with validation against the approved FAQ list.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46288986538163,"sku":"N8N-21700","price":50.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/FOR4JwbL9wPs8wdORH9Uk_q8Uh55ZM.png?v=1793005549","url":"https:\/\/buyflowscripts.com\/products\/n8n-whatsapp-faq-webhook-openai-fallback-by-keyword-matching","provider":"N8N Commerce","version":"1.0","type":"link"}