Skip to main content

AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base

Workflow preview

Workflow preview
100%
AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow automates customer email support by combining Gmail, AI classification, and a knowledge base to provide instant, accurate, and friendly responses. It’s designed for businesses that wa...

Best for

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

Tools used

n8n-nodes-base.gmailtrigger, @n8n/n8n-nodes-langchain.textclassifier, @n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.noop, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.gmail

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base
Workflow name
AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base

This workflow automates customer email support by combining Gmail, AI classification, and a knowledge base to provide instant, accurate, and friendly responses. It’s designed for businesses that want to improve customer satisfaction while reducing manual workload.


🚀 How it Works

  1. Gmail Trigger
    The workflow listens for new incoming Gmail messages.

  2. Text Classification
    Each email is classified using AI as either Customer Support or Other.

    • If it’s Other, the workflow stops.
    • If it’s Customer Support, the email continues to the AI agent.
  3. AI Agent with Knowledge Base
    The AI agent:

    • Reads the customer’s message.
    • Searches the Pinecone Knowledge Base for FAQs and policies.
    • Generates a helpful, polite, and detailed reply using an OpenRouter model.
    • Signs off as Mrs. Helpful from Tech Haven Solutions.
  4. Reply to Gmail
    The drafted email is automatically sent back to the customer.


💡 Value

  • Save Time – No more manual triaging and drafting of replies.
  • Consistency – Every answer is based on your own FAQ/policies.
  • Customer Satisfaction – Fast, friendly, and accurate responses 24/7.
  • Scalable – Handle higher email volume without scaling headcount.

🔑 Credentials Needed

To use this workflow, connect the following accounts:

  • Gmail OAuth2 → for receiving and sending emails.
  • OpenRouter API → for text classification and AI-generated replies.
  • OpenAI API → for embeddings (to connect FAQs with AI).
  • Pinecone API → for storing and retrieving knowledge base content.

🛠 Example Use Case

A customer writes:

> “Hi, I placed an order last week but haven’t received a shipping confirmation yet. Can you check the status?”

The workflow will:

  1. Detect it’s a support-related email.
  2. Retrieve order policy information from the knowledge base.
  3. Generate a friendly response explaining order tracking steps.
  4. Automatically reply to the customer in Gmail.

⚡️ Setup Instructions

  1. Import this workflow into your n8n instance.
  2. Connect your Gmail, OpenRouter, OpenAI, and Pinecone credentials.
  3. Populate your Pinecone knowledge base with FAQs and policies.
  4. Activate the workflow.

From now on, all support-related emails will be automatically answered by your AI-powered support agent.


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 - Gmail Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.2

Block 2 - Text Classifier

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

Block 3 - OpenRouter Chat Model

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

Block 4 - No Operation, do nothing

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

Block 5 - AI Agent

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

Block 6 - OpenRouter Chat Model1

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

Block 7 - knowledgeBase

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

Block 8 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 9 - Reply to a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 10 - Sticky Note

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

Block 11 - Sticky Note1

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

Block 12 - Sticky Note2

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

Block 13 - Sticky Note3

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

Block 14 - Sticky Note4

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

Block 15 - Sticky Note5

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

3. Summary Table

Workflow AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base
Complexity advanced
Nodes 15
Categories Support Chatbot, AI Chatbot
Author Emilio Loewenstein
Published 09 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9414/9414.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 AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base do?

This workflow automates customer email support by combining Gmail, AI classification, and a knowledge base to provide instant, accurate, and friendly responses. It’s designed for businesses that wa...

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 Chatbot use case.