Answer Gmail support emails with OpenAI and a Pinecone knowledge base
Ready for 3.0What 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).
- config (Code): runs custom JavaScript code
- read the email (Code): runs custom JavaScript code
- a readable email? (If): checks a condition and branches into true / false
- OpenAI configured? (If): checks a condition and branches into true / false
- STOP: unreadable email (Code): runs custom JavaScript code
- build the classification request (Code): runs custom JavaScript code
- classify by keywords (Code): runs custom JavaScript code
- [cred] OpenAI - classify the email (HTTP Request): calls api.openai.com (POST)
- a support request? (If): checks a condition and branches into true / false
- apply the AI classification (Code): runs custom JavaScript code
…plus 31 more steps. See the full node list below.
Services it uses
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)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail
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…