Answer WhatsApp support chats with OpenRouter, Pinecone, Gemini and Gmail
Go to WorkflowDescription
Quick overview
This workflow triggers on incoming WhatsApp messages, uses an OpenRouter chat model with Pinecone retrieval (Gemini embeddings) to answer from your support knowledge base, and escalates unanswered or sensitive requests to a human via Gmail before replying back on WhatsApp.
How it works
Triggers when a new WhatsApp message is received on your WhatsApp Business number.
Loads workflow settings (business name, models, support email, language, memory window) and extracts the customer message, phone number, and WhatsApp phone number ID.
Ignores events that don’t contain an incoming text message.
Uses an OpenRouter chat model with per-customer conversation memory and queries a Pinecone knowledge base (with Google Gemini embeddings) to generate an answer based only on retrieved content.
If the request can’t be answered from the knowledge base or needs human help (e.g., refund/complaint/cancellation or the customer asks for a person), emails the support team via Gmail and returns the predefined escalation notice.
Sends the resulting reply back to the customer over WhatsApp.
Setup
Connect your WhatsApp Business Cloud credentials for both receiving messages (trigger) and sending replies, and ensure the workflow uses the correct phone number.
Add an OpenRouter API credential and set the desired OpenRouter model ID in the configuration.
Set up a Pinecone index populated with your support content, create a Pinecone credential, and select the target index in the knowledge base connector.
Add a Google Gemini (PaLM) API credential for embeddings and ensure the embedding model matches the one used when you ingested documents into Pinecone.
Add a Gmail OAuth2 credential and set the support team destination email address in the configuration.
Additional info
Answer WhatsApp support chats from a Pinecone knowledge base with human escalation
📥 Open full documentation on Notion
Need help customizing?
Contact me for consulting and support : Linkedin
MY NEW YOUTUBE CHANNEL
👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.