Triage and draft Gmail support replies with Stripe, GPT-4.1, and Slack
Needs changesWhat this workflow does
This AI workflow has 32 nodes and runs on Gmail events. Along the way it connects OpenAI Chat Model, Stripe, Gmail and Slack and 1 more. It also calls api.stripe.com and gmail.googleapis.com over HTTP.
How it runs
Trigger: On Gmail events.
- Set Support Parameters (Edit Fields (Set)): sets 5 fields: companyName, supportFromEmail, supportEmailAddresses…
- Filter: keeps only the items that match a condition
- Retrieve Full Email Message (Gmail): get
- Batch Process Messages (Loop Over Items (Split in Batches)): loops over the items in batches
- Extract Key Email Details (Edit Fields (Set)): sets 5 fields: From, Subject, threadId…
- Fetch Email Metadata (HTTP Request): calls an HTTP API
- Extract Gmail Thread ID (Code): runs custom JavaScript code
- Parse Email Content (Code): runs custom JavaScript code
- Retrieve Email Thread History (Gmail): get (thread)
- Build Thread Transcript (Code): runs custom JavaScript code
…plus 17 more steps. See the full node list below.
Services it uses
HTTP calls to: api.stripe.com, gmail.googleapis.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Draft Customer Reply (v1.7), AI Draft Non-Customer Reply (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Draft Customer Reply (v1.7), AI Draft Non-Customer Reply (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (14)
- Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - AI Agent
@n8n/n8n-nodes-langchain.agent - Stripe
n8n-nodes-base.stripe - Gmail
n8n-nodes-base.gmail - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Filter
n8n-nodes-base.filter - Edit Fields (Set)
n8n-nodes-base.set - Gmail Trigger
n8n-nodes-base.gmailTrigger - Google Docs
n8n-nodes-base.googleDocs
From the author
Quick Overview This workflow polls Gmail for new inbox emails, looks up the sender in Stripe to classify them as a customer or non-customer, uses OpenAI plus Google Docs playbooks to draft a reply, and posts the draft to Slack for human review while sending…