For your agency support inbox · n8n + Gmail + OpenAI + Pinecone

Hi, this is how your
workflow would run.

An email arrives, the workflow decides if it is a support request, pulls the right answer from your Pinecone knowledge base and replies in the original Gmail thread. When the knowledge is not good enough, a person gets it instead. Built and tested before applying.

Run the 8 test emailsDownload the workflow JSON
1280 × 720 · 36 s8 test emails through the workflowRecorded simulation, fictional data

The workflow, running.

This is the real node layout of the importable JSON. Press run: each fictional email lights up the path it takes, and the result lands in the log.

Incoming
–
Result
–

Recorded simulation: the Code nodes and the routing are executed from the workflow JSON itself. Gmail is replaced by 8 fixture emails, OpenAI calls are the LLM step (client's own API key) and are mocked here, Pinecone is a local keyword index over a small fictional knowledge base. In your project it runs against your real Gmail, OpenAI and Pinecone index.

Process flow.

Gmailnew email AI classifysupport? Retrieve (RAG)Pinecone top 4 Score ≥ 0.78?knowledge gate AI replyfrom snippets only Reply in threadGmail Label + skipnot support Escalate to humanlow knowledge or API error Log rowevery email, once nonoerror after 3 tries

Test log: 8 emails, 8/8 passed.

Each scenario from your post, with the route the workflow took. Full trace per email in test-log.json.

#ScenarioEmailCategoryTop scoreRouteResult
m01Support email, strong KB matchOur website is down!!
dana@harborbakery.example · thread t01
outage0.95Replied in threadPASS
m02Billing question, strong KB matchCopy of invoice 2026-0412
accounts@peakdental.example · thread t02
outage0.95Replied in threadPASS
m03Newsletter, filtered without reply5 growth hacks for agencies this week
news@growthweekly.example · thread t03
newsletter–Filtered, no replyPASS
m04Change request, KB matchChange the banner on the homepage
mark@ridgeoutdoor.example · thread t04
change_request0.905Replied in threadPASS
m05Follow-up in existing thread (thread continuity)Re: Our website is down!!
dana@harborbakery.example · thread t01
outage0.95Replied in threadPASS
m06Support question the KB cannot answerCustom ERP sync for our product feed
li@oakfurniture.example · thread t06
other_support0.5Escalated to humanPASS
m07Auto-reply, filtered without replyAutomatic reply: Out of office
sam@peakdental.example · thread t07
auto_reply–Filtered, no replyPASS
m08Credential failure on the reply step (OpenAI 401), retried, then escalatedPassword reset email not arriving
nina@citylaw.example · thread t08
access0.95Escalated to humanPASS

Validation checklist

Node by node.

The integration mapping that ships with the handover document.

NodeWhat it doesCredential
Gmail TriggerPolls the support inbox every minute for unread mail in INBOX.Gmail OAuth2
Normalize emailCaptures sender, subject, body, message ID and thread ID once, so every later node uses the same fields.–
AI classifyOpenAI chat call in JSON mode: is_support, category, confidence, a short search query. Retries 3× with 2 s wait; errors go to escalation.OpenAI
Parse classification · Is support?Unparsable answers or confidence under 0.6 never trigger a reply. Non-support mail is labelled and logged.–
Embed question · Pinecone queryOpenAI embeddings of the search query, top 4 matches with metadata from your existing index and namespace.OpenAI, Pinecone
Knowledge gate · Enough knowledge?Only answers when the top match is at least 0.78 (tunable in one place). Builds the numbered context for the reply.–
AI draft replyAnswers only from the snippets, says a person will follow up if they do not cover it.OpenAI
Reply in threadGmail reply operation on the original message ID, so the answer stays in the customer's thread.Gmail OAuth2
Prepare escalation · Escalate to humanEvery path that cannot answer safely (low knowledge, API or credential error) lands here and goes to the support lead with context.Gmail OAuth2
Log … · Write log rowExactly one row per email in a Google Sheet: route, category, score, sources, note.Google Sheets
Error Trigger · Alert support leadAnything unexpected sends an alert with the failing node and execution link.Gmail OAuth2

Three steps, three working days.

1 · Access and assumptions

You add the Gmail, OpenAI and Pinecone credentials in n8n. I confirm the index name, namespace, embedding model and who receives escalations.

2 · Configure and test

Import the workflow, connect your credentials and index, tune the score threshold on your own emails, then run every scenario from your list.

3 · Handover

Workflow design and integration mapping, process diagram, testing notes with checklist, handover summary with activation and maintenance steps, final JSON.

One package, one price.

Fixed price
$390

The complete workflow configured on your n8n, tested against all scenarios from your post, plus the five handover documents. Delivered within 3 working days of access.

Running costs
On your accounts

n8n, OpenAI and Pinecone run on your own accounts and keys. Nothing is routed through mine.

FAQ.

What is in scope?

The workflow from your post (Gmail → AI classification → Pinecone retrieval → AI reply in thread, with escalation), error handling and retries, testing of all listed scenarios, and the five handover documents including the importable JSON.

Assumptions I would confirm before starting

Your n8n version and hosting (cloud or self-hosted), the Pinecone index name, namespace and the embedding model it was built with (the query must use the same one), one support inbox, English emails, and the address that receives escalations.

Support window

14 days after handover for fixes and threshold tuning, included. I work Central European business hours, which overlaps with your US morning.

What is not included?

Building or re-indexing the Pinecone knowledge base, extra inboxes or channels (chat, helpdesk tools), attachments and image parsing, ongoing monitoring after the support window, and the usage costs of n8n, OpenAI and Pinecone.