Templates / Answer Gmail support emails with OpenAI and a Pinecone knowledge base

Answer Gmail support emails with OpenAI and a Pinecone knowledge base

Ready for 3.0

by Atharva Ashtekar ✓ · 0 views · created 2026-10-14 · Ticket Management, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 43 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Gmail. It also calls api.openai.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. config (Code): runs custom JavaScript code
  2. read the email (Code): runs custom JavaScript code
  3. a readable email? (If): checks a condition and branches into true / false
  4. OpenAI configured? (If): checks a condition and branches into true / false
  5. STOP: unreadable email (Code): runs custom JavaScript code
  6. build the classification request (Code): runs custom JavaScript code
  7. classify by keywords (Code): runs custom JavaScript code
  8. [cred] OpenAI - classify the email (HTTP Request): calls api.openai.com (POST)
  9. a support request? (If): checks a condition and branches into true / false
  10. apply the AI classification (Code): runs custom JavaScript code

…plus 31 more steps. See the full node list below.

Services it uses

Gmail

HTTP calls to: api.openai.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) ([cred] Gmail - new email in the inbox).

Nodes used (6)

From the author

Quick overview This workflow monitors a Gmail inbox for new unread messages, classifies them with OpenAI (or keyword rules), searches a Pinecone knowledge base for relevant help content, and either replies in the original Gmail thread or escalates the case to…

Excerpt from Atharva Ashtekar's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.