Skip to main content

Route RAG customer support across WhatsApp and Outlook with Pinecone and OpenRouter

Workflow preview

Workflow preview
100%
Route RAG customer support across WhatsApp and Outlook with Pinecone and OpenRouter preview
Open on n8n.io

1. Workflow Overview

Quick overview A production ready 3 workflow system that handles customer support across WhatsApp and Email using RAG powered AI. Automatically routes queries, detects escalation intent, logs hando...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.formtrigger, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.documentdefaultdataloader, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.embeddingsgooglegemini, @n8n/n8n-nodes-langchain.textsplittertokensplitter, n8n-nodes-base.whatsapptrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Salman Mehboob.

Original n8n.io source

1.1 Workflow description

Title
Route RAG customer support across WhatsApp and Outlook with Pinecone and OpenRouter
Workflow name
Route RAG customer support across WhatsApp and Outlook with Pinecone and OpenRouter

Quick overview

A production-ready 3-workflow system that handles customer support across WhatsApp and Email using RAG-powered AI. Automatically routes queries, detects escalation intent, logs handoffs to Google Sheets, alerts your team via Slack, and lets agents resolve cases with a single slash command.

How it works

  1. A form trigger accepts PDF, DOCX, and TXT documents, chunks them with a token splitter, embeds them using Google Gemini, and stores them in your Pinecone vector store to build the AI knowledge base.
  2. Incoming messages from WhatsApp Business Cloud API and Microsoft Outlook are each normalized into a unified contact format — capturing channel, contact ID, name, and message text — before merging into a single pipeline.
  3. Every message is checked against a Google Sheets handoff tracker. If the contact is currently assigned to a human agent, the message is forwarded directly to Slack without any AI involvement.
  4. For active (non-handoff) contacts, the AI Support Agent queries Pinecone via RAG, pulls context from a sliding conversation memory window, and returns a structured JSON output containing a reply and a handoff_requested flag.
  5. If the AI detects escalation intent or has no answer, it sets handoff_requested: true — the contact is logged to Google Sheets, AI goes silent for that contact, and a detailed alert is posted to your Slack support channel.
  6. Answers are routed back through the originating channel — WhatsApp replies via Business Cloud API, email replies via Microsoft Outlook — keeping every conversation native to its platform.
  7. Support agents run /resolve [contact_id] in Slack to close a handoff. The workflow validates the input, updates the Google Sheets row with agent name and timestamp, re-enables AI for that contact, and confirms resolution in the Slack channel.

Setup

  1. Pinecone + Embeddings: Create a Pinecone index and add your Pinecone credential to the "Insert into Vector Store" and "Knowledge Base" nodes. Set your Google Gemini API credential on both Embeddings nodes (one in Workflow 1, one in Workflow 2).
  2. WhatsApp: Connect your WhatsApp Business Cloud API credential to the WhatsApp Trigger node. Replace YOUR_WHATSAPP_PHONE_NUMBER_ID in both Send WhatsApp Message nodes.
  3. Email: Add your Microsoft Outlook OAuth2 credential to the Outlook Trigger and the Send Email Answer node.
  4. Handoff Sheet: Create a Google Sheet with a tab named Handoffs and these column headers exactly: contact_id | channel | contact_name | status | handoff_since | resolved_by | resolved_at. Set your Google Sheets credential and paste your Sheet ID into all four Google Sheets nodes across Workflows 2 and 3.
  5. Slack: Create a Slack bot app, add it to your support channel, and set the credential in all three Slack nodes. Update the channel name if yours differs from #support-handoff.
  6. AI Model: Add your OpenRouter (or OpenAI) API key to the Chat Model node. Swap the model slug in node settings as needed.
  7. Slash Command: Activate Workflow 3 first to generate its production webhook URL. Then in your Slack app settings go to Slash Commands → Create New → set command to /resolve → paste the webhook URL → reinstall app to workspace.
  8. Activate order: Workflow 1 (KB ingestion) → Workflow 3 (resolve handler) → Workflow 2 (main support flow).

Requirements

  • n8n (self-hosted or cloud)
  • WhatsApp Business Cloud API account (Meta Developer App)
  • Microsoft 365 / Outlook account
  • Pinecone account
  • Google Gemini API key
  • OpenRouter or OpenAI API key or Any other LLM
  • Google Sheets
  • Slack workspace with a custom bot app

Customization

  • Edit the system prompt in the AI Support Agent node to match your brand voice, support scope, and escalation rules
  • Swap Google Gemini Embeddings for OpenAI Embeddings — just replace the Embeddings node and ensure your Pinecone index dimensions match
  • dd more channels (Telegram, Instagram DM, etc.) by normalizing their payloads into the same contact format and feeding them into the Merge node
  • Adjust conversation memory window (default: 8 messages) in the Conversation Memory node
  • Trigger the resolve webhook from your CRM or helpdesk instead of Slack if preferred

Additional info

All three workflows must be active simultaneously for the system to function Handoff state is persisted in Google Sheets and survives n8n restarts or server reboots Once a contact enters handoff, the AI is completely silent for that contact — no accidental double-responses Document metadata (filename, uploader name, timestamp) is stored alongside vectors in Pinecone for full traceability Default chunk settings: 500 tokens / 100 overlap — tune in the Token Splitter node based on your document style

Contact / Support

🔗 n8n Templates: n8n.io/creators/salmanmehboob 💼 LinkedIn: linkedin.com/in/salman-mehboob-pro 📧 Email: [email protected] 💬 WhatsApp: +92 306 746 6499

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note cbdd800e

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note 9ee08a90

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note 26ce77f0

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Document Upload Form

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.5

Block 13 - Insert into Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.3

Block 14 - Document Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 15 - Ingestion Success

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Embeddings Model

Type / Role
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - embeddingsGoogleGemini
Config choices
Version 1

Block 17 - Token Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterTokenSplitter - textSplitterTokenSplitter
Config choices
Version 1

Block 18 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 19 - Normalize WhatsApp

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - AI Support Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 21 - Conversation Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.4

Block 22 - Knowledge Base

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.3

Block 23 - Structured Reply Schema

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 24 - Is Handoff Requested?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Showing the first 24 of 52 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Route RAG customer support across WhatsApp and Outlook with Pinecone and OpenRouter
Complexity advanced
Nodes 52
Categories Support Chatbot, AI RAG
Author Salman Mehboob
Published 22 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16545/16545.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Route RAG customer support across WhatsApp and Outlook with Pinecone and OpenRouter do?

Quick overview A production ready 3 workflow system that handles customer support across WhatsApp and Email using RAG powered AI. Automatically routes queries, detects escalation intent, logs hando...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI RAG use case.