n8nDemo tested10 nodes
AI email triage with Gmail labels and drafted replies
Inbound mail is labeled billing, sales, support, or VIP, and a reply is drafted in Gmail. VIP mail is also posted to Slack. Nothing is sent automatically.
Portfolio reference build with demo data and placeholder credentials, not a client deployment.
Pain
Stops the inbox from taking the first two hours of the morning. The blueprint tags threads, flags urgent ones to Slack, and writes a draft.
Solution
Inbound mail is labeled billing, sales, support, or VIP, and a reply is drafted in Gmail. VIP mail is also posted to Slack. Nothing is sent automatically.
Impact · From the blueprint
About 3 minutes per email, often 5 hours a week in a busy inbox
Library status: executed. Imported into a local n8n and executed on the demo branch until it returned demo_ready.

Step inspector
The first step shows the checked-in sample payload.Later steps name the node. They are not a live execution.
Guardrails
- Demo mode?
- Create Gmail draft
Credential ids in the JSON are placeholders. These files are portfolio demos.
Deploy this for your business
Tell us this slug and what still happens by hand. We will map it onto your accounts. This page is not a claim that the blueprint already runs for a customer.
README
Portfolio demo only. This workflow is an original example for demonstration. It is not client work and it does not represent a deployment for any customer.
| Category | email |
| Difficulty | intermediate |
| Apps | Gmail, Slack |
| Time saved | About 3 minutes per email, often 5 hours a week in a busy inbox |
| Demo status | Run Run demo in n8n. The live apps stay on the false branch until you send demo: false. |
Problem
A shared Gmail inbox is read top to bottom. Billing questions wait behind newsletters, and the draft someone would have written is retyped every time.
Who it is for
Founders and virtual assistants who run client work from one Gmail inbox.
What the workflow does
Inbound mail is labeled billing, sales, support, or VIP, and a reply is drafted in Gmail. VIP mail is also posted to Slack. Nothing is sent automatically.
The checked-in sample is the contract. Apply rules turns that payload into a summary, a route, a record for the destination apps, and an actions list describing each write the live branch would make. Package demo result returns that object when demo is true, which is the default.
Estimated time saved
About 3 minutes per email, often 5 hours a week in a busy inbox. The figure assumes the sample's volume and a person who currently does the same triage by hand. It is a planning number for a portfolio review, not a measured client result.
Node by node
- Overview. Sticky note with the portfolio-demo disclaimer and how to run the offline path.
- Run demo. Manual trigger used by the editor and by
n8n execute. With no payload, the next node loads the sample. - Inbound webhook. Production-style POST webhook at
/webhook/ai-gmail-triage-drafts. Responds with the last node's JSON. - Gmail trigger. Gmail trigger for new mail. Swap the query filter in the node for the mailbox you actually use.
- Normalize input. Fills any missing fields from the checked-in sample and forces an explicit demo flag. An empty manual run therefore always has something valid to score.
- Apply rules. Keyword triage with a weight per label. Billing wins on invoice and refund language. The draft is a holding reply, not a send.
- Demo mode?. Routes to the offline result while
demois true. The live apps run only when a caller sends demo:false. - Package demo result. Shapes the object returned to the editor, the CLI, and the webhook: summary, route, record, and the actions the live branch would have taken.
- Label Gmail thread. Gmail label using the subject and body on the record.
- Create Gmail draft. Gmail draft using the subject and body on the record.
- Post #inbox. Posts slackText to #inbox.
Diagram
flowchart LR n0["Run demo"] n1["Inbound webhook"] n2["Gmail trigger"] n3["Normalize input"] n4["Apply rules"] n5["Demo mode?"] n6["Package demo result"] n7["Label Gmail thread"] n8["Create Gmail draft"] n9["Post #inbox"] n0 --> n3 n1 --> n3 n2 --> n3 n3 --> n4 n4 --> n5 n5 -->|demo| n6 n5 -->|live| n7 n7 --> n8 n8 --> n9
Sample input
Save as the webhook body, or rely on the manual trigger, which loads the same object from Normalize input.
{
"demo": true,
"from": "cfo@harbor.example",
"subject": "Invoice 2041 looks off",
"body": "The latest invoice does not match the payment we sent. Please refund the difference."
}
The file next to this README, sample-input.json, is the same payload.
Setup
- Import
workflow.jsonwith n8n's Import from File. The workflow arrives inactive. - Select Run demo and execute it. Package demo result returns
status: demo_readyplus the summary, route, record, and actions. - Create each credential listed below in n8n and choose it on the matching node. The
PLACEHOLDER_*ids are labels, not secrets. - Replace every
YOUR_*resource id (sheet, channel, list, parent page, calendar) with a resource you own. - Optional HTTP check: POST
sample-input.jsonto/webhook/ai-gmail-triage-draftswhile the workflow is published. The defaultdemo: trueflag stays on the offline path. - Connect the live apps, send the same JSON with
"demo": false, confirm one real record, then publish.
Credentials
- Gmail account (
gmailOAuth2), placeholder idPLACEHOLDER_GMAILOAUTH2 - Slack account (
slackOAuth2Api), placeholder idPLACEHOLDER_SLACKOAUTH2API
Placeholder ids are not real credentials. n8n will show them as missing until you create a credential of that type and select it on the node. Do not paste production secrets into the workflow JSON.
Customization
- Keep the Gmail node on draft, not send, until you have watched a week of drafts.
- Add a newsletter label whose words include unsubscribe, and stop the draft for that route.
- Draft replies, do not send them, until a human has approved the voice for a week.
- Keep VIP senders on an explicit list in the rules node rather than hoping the model notices them.
Demo mode and the live branch
- Execute Run demo or POST the sample to
/webhook/ai-gmail-triage-draftswithdemoomitted or true. The run stops after Package demo result. - POST the same JSON with
"demo": falseonly after every placeholder credential on the live branch has been replaced. - The rules engine is intentionally local so the workflow can be reviewed and tested without buying model or SaaS credits. When you want a live model, put it on the live branch in front of the app nodes, or replace Apply rules with an Information Extractor / AI Agent and keep the same output shape.
Portfolio note
Built as a portfolio demo for Mustafa (mustafaautomation). Public demos live under *.quvantic.com. Vendor names belong to their owners. Nothing in this folder is a customer deliverable.