← Back to blog

n8n: Auto-triage support emails into a Google Sheet by category

Build idea, not a verified tutorial. This was drafted by an automation Daniel built. Tool interfaces change often — check the current docs before relying on the steps.

Every inbound support email sits in one inbox until someone reads it and decides where it belongs. That decision delay costs time and sometimes misses urgent issues. This workflow reads each new email, uses AI to label it (Billing, Bug, or General), and appends a row to the matching tab in a shared Google Sheet — so the right person sees it the moment it lands.

TRIGGERORCHESTRATEAI / ENRICHOUTPUTNew email in GmailText Classifier nodeSwitch node (3branches)Google Sheets —Append Row
How it flows
1

Create a free n8n Cloud account and open a new workflow

n8n is a visual automation tool. Each automation is called a workflow — a series of connected steps drawn on a canvas (the grid background). Go to app.n8n.cloud, sign up, and click New workflow in the left sidebar. You'll land on an empty canvas with an 'Add first step' prompt in the centre.

n8n · Empty canvas
1 Start a new workflow
New workflow
2 Open the node picker
Add first step
2

Add a Gmail Trigger node to watch your inbox

A trigger node is the starting point of every workflow — it listens for something to happen and kicks everything off. Search for 'Gmail Trigger', select it, and it appears as the first box on your canvas. Inside the node panel: set Event to 'Message Received', connect your Google account under Credential to connect with, set Read Status to 'Unread emails only', and set Poll Times to every minute. This makes n8n check your inbox every 60 seconds for new messages.

Gmail Trigger node · Parameters panel
1 Search for the trigger node
2 Configure the trigger
EventMessage Received
Read StatusUnread emails only
Poll TimesEvery minute
SimplifyOff (returns full email body)
3

Prepare your Google Sheet with three tabs and a header row

Before n8n can write to a sheet, the sheet needs to exist and have a header row — a first row with column names. Open Google Sheets, create a new spreadsheet called 'Support Triage', and add three tabs: 'Billing', 'Bug', and 'General'. In row 1 of each tab, type these headers across columns A–D: Date | From | Subject | Snippet. n8n's Append Row operation uses that first row as a map, so the column names must match exactly.

Google Sheets · Sheet setup (do this before building the rest)
1 Create three tabs
Right-click a sheet tab and choose 'Insert sheet'. Name them Billing, Bug, and General. Google Sheets: Add a sheet →
2 Add these headers in row 1 of each tab
Column ADate
Column BFrom
Column CSubject
Column DSnippet
4

Add a Text Classifier node to label each email

The Text Classifier node is a built-in AI step in n8n that reads text and assigns it one of the categories you define. Click the + connector on the right side of your Gmail Trigger node, search for 'Text Classifier', and select it. In the node panel: set Text to the expression `{{ $json.text }}` (this pulls the email body from the previous step — the double curly braces tell n8n 'use data from earlier in the workflow'). Then add three Categories: Billing, Bug, General. You will also need to connect an AI model — click Add model, search for 'OpenAI Chat Model', and enter your OpenAI API key.

Text Classifier node · Parameters panel
1 Add the classifier node
2 Set up the classifier
Text{{ $json.text }}
CategoriesBilling, Bug, General
3 What the node does internally
Read the email text. Assign exactly one label: Billing (payment, invoice, refund), Bug (error, crash, not working), or General (everything else).
Returns{ "category": "Billing" }
5

Add a Switch node to route each email to the right branch

A Switch node works like a traffic sign — it reads one value and sends data down different paths depending on what it finds. Click + on the Text Classifier node, search for 'Switch', and add it. Set Mode to 'Rules'. Add three rules, one per tab: Rule 1 — when `{{ $json.category }}` equals `Billing`; Rule 2 — equals `Bug`; Rule 3 — equals `General`. Each rule creates a separate output connector on the right side of the node.

Switch node · Parameters panel
1 Add the routing node
2 Configure three routing rules
ModeRules
Rule 1 — Value{{ $json.category }} equals Billing
Rule 2 — Value{{ $json.category }} equals Bug
Rule 3 — Value{{ $json.category }} equals General
6

Add a Google Sheets node to each branch to append the row

Now connect a Google Sheets action node to each of the three Switch outputs. Click + on the 'Billing' output, search for 'Google Sheets', and select it. Set Operation to 'Append Row'. Paste your Google Sheet's URL into Document URL or ID, set Sheet Name to 'Billing', then map the four columns. Repeat — adding separate Google Sheets nodes — for the Bug and General outputs, changing only the Sheet Name each time.

Google Sheets node · Parameters panel (repeat for each branch)
1 Add a Sheets node to the Billing output
2 Operation and target sheet
OperationAppend Row
Document URL or IDPaste your sheet URL here
Sheet NameBilling (or Bug / General for the other branches)
3 Map email data to your column headers
{{ $('Gmail Trigger').item.json.date }}Date
{{ $('Gmail Trigger').item.json.from }}From
{{ $('Gmail Trigger').item.json.subject }}Subject
{{ $('Gmail Trigger').item.json.snippet }}Snippet
Ignore blank values
7

Test the workflow, then activate it

Click Execute Workflow (bottom of the canvas) to do a one-off manual run. n8n will fetch your latest unread email, classify it, and write a row to the correct tab. Check the sheet to confirm. If the data looks right, click the toggle in the top-right corner of the canvas to Activate the workflow. From that point n8n polls your inbox every minute, automatically, without you doing anything.

n8n canvas · Test and activate
1 Run it once to test
Execute Workflow
2 What a successful result looks like
New row in 'Billing' tabBilling
Date2026-08-08
Fromcustomer@example.com
SubjectInvoice question
SnippetHi, I was charged twice this month…
3 Switch on continuous polling
Activate workflow

What you get

You end up with a live workflow that reads every new support email, tags it as Billing, Bug, or General, and appends a timestamped row to the matching tab in your shared Google Sheet — with no manual sorting needed. Your team opens one sheet and sees only the tickets that belong to them. Rough effort: ~2 hours to set up; free on n8n Cloud trial. After the trial, n8n Cloud starts at ~$20/month. An OpenAI API key is required for the Text Classifier (costs fractions of a cent per email)..

Sources