Gmail to Linear, emails turned into clean tickets
Your support inbox is where good product feedback goes to die. Not because you don’t care, but because triage turns into a blur of scanning, copying details into tools, and trying to reply with the “right” tone when you’re already behind.
Support leads feel it first. Product managers get the fallout when bug reports aren’t logged. And if you run a small business, you’re probably doing both jobs. This Gmail Linear tickets automation turns new emails into clean Linear issues and ready-to-send replies, without turning your day into inbox roulette.
You’ll see how the workflow classifies each email, drafts a reply you can approve, and creates Linear tickets only when it actually should.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Gmail to Linear, emails turned into clean tickets
flowchart LR
subgraph sg0["New Email Flow"]
direction LR
n0@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n1@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model2", pos: "b", h: 48 }
n2@{ icon: "mdi:play-circle", form: "rounded", label: "New Email", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "AI Classifier", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "AI Email Writer", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Prompt", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set (edited) prompt", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "Structured Output", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Structured Output1", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Human response", pos: "b", h: 48 }
n10@{ icon: "mdi:message-outline", form: "rounded", label: "Reply to thread", pos: "b", h: 48 }
n11@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n12@{ icon: "mdi:cog", form: "rounded", label: "Email Processed", pos: "b", h: 48 }
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linear.svg' width='40' height='40' /></div><br/>Create an issue"]
n14@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Is bug of feature request?", pos: "b", h: 48 }
n15@{ icon: "mdi:robot", form: "rounded", label: "AI Agent", pos: "b", h: 48 }
n16@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n17@{ icon: "mdi:brain", form: "rounded", label: "GPT-5-mini", pos: "b", h: 48 }
n18@{ icon: "mdi:swap-vertical", form: "rounded", label: "Email to process", pos: "b", h: 48 }
n19@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Is test run?", pos: "b", h: 48 }
n21["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Test Emails 2nd batch"]
n22@{ icon: "mdi:cog", form: "rounded", label: "No Action", pos: "b", h: 48 }
n23["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch approved classificatio.."]
n24@{ icon: "mdi:cog", form: "rounded", label: "Human review", pos: "b", h: 48 }
n25["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch approved email examples"]
n15 --> n13
n2 --> n18
n22 --> n12
n17 -.-> n15
n5 --> n4
n24 --> n9
n19 --> n10
n19 --> n14
n3 --> n25
n9 --> n19
n9 --> n22
n9 --> n6
n4 --> n24
n13 --> n12
n12 --> n18
n10 --> n14
n18 --> n23
n0 -.-> n3
n7 -.-> n4
n1 -.-> n4
n8 -.-> n3
n6 --> n4
n21 --> n18
n16 -.-> n15
n14 --> n15
n25 --> n5
n11 --> n21
n23 --> n3
end
subgraph sg1["Flow 2"]
direction LR
n20["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Test Emails (to fill memory)"]
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n2,n11 trigger
class n3,n4,n7,n8,n15,n16 ai
class n0,n1,n17 aiModel
class n9,n14,n19 decision
class n23,n25 api
class n21,n20 code
classDef customIcon fill:none,stroke:none
class n13,n21,n23,n25,n20 customIcon
Why This Matters: Email Triage Eats Your Product Pipeline
Support email is messy by nature. One message is a real bug with steps to reproduce, the next is a vague “it doesn’t work,” and the next is a feature request hiding inside a complaint. Manually sorting that, writing a reply, and then deciding if it belongs in Linear takes more time than it should, and the switching cost is brutal. Even worse, the best requests get lost because they didn’t look urgent in the moment, or because the person triaging meant to “log it later.” Later rarely happens.
The friction compounds. Here’s where it usually breaks down.
- Every email forces you to make a decision fast, and the wrong call means missed bugs or noisy tickets.
- Reply quality gets inconsistent because you’re writing from scratch when you’re tired or rushed.
- Copy-pasting details into Linear leads to thin, low-context issues that engineers have to chase down later.
- Important customer language never makes it into your product backlog, so prioritization becomes guesswork.
What You’ll Build: Gmail-to-Linear Triage With Approved Replies
This workflow watches your Gmail inbox for new messages and runs each email through an AI classifier that uses your own approved examples. Once it understands what the email is (bug report, feature request, sales opportunity, and so on), it drafts a reply in the right style for that category. Then it hands the classification and draft reply to a human review step in gotoHuman, so you can approve, edit, or retry before anything goes out. If the message is a bug or feature request, a second AI step drafts a structured Linear issue and creates it automatically. Over time, the workflow gets better because your approvals become training examples it reuses on the next run.
The workflow starts on a new Gmail email trigger and queues messages in batches so you don’t get slammed during busy hours. OpenAI-powered agents handle classification and writing, and gotoHuman provides the “human-in-the-loop” checkpoint. After approval, Gmail sends the reply in-thread, and Linear only receives tickets that match your bug/feature rules.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you get 20 support emails a day. Manually, if you spend about 5 minutes to understand and draft a reply plus another 5 minutes to write up a decent Linear ticket for the ones that matter, that’s roughly 2 to 3 hours of triage time most days. With this workflow, you skim the AI’s classification and reply in gotoHuman, approve, and move on. Even if you spend 1 minute per email reviewing, you’re usually getting about 2 hours back while keeping tickets and replies consistent.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Gmail for the email trigger and replies.
- Linear to create issues for bugs and feature requests.
- OpenAI API key (get it from the OpenAI API dashboard).
- gotoHuman account for review and approved examples memory.
Skill level: Intermediate. You’ll connect credentials and tweak a few prompts, but you won’t be writing code unless you want extra customization.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A new Gmail email arrives. The Gmail Trigger detects the message and pushes it into a batch queue, so the workflow can handle busy periods without timing out.
Approved examples are pulled in for context. Two HTTP Request steps retrieve previously approved classifications and replies from gotoHuman, which gives the AI something real to imitate instead of guessing your standards.
The workflow classifies and drafts a reply. An AI Agent analyzes the email category, then another agent writes a draft response. Structured parsers clean up the output so you’re not dealing with messy, unformatted text.
You approve (or fix) it in gotoHuman. The Human Review Task is the control point. After you approve, the workflow replies in the original Gmail thread, and only bug/feature emails continue on to a ticket-drafting agent that creates a Linear issue.
You can easily modify the category list to match your inbox reality, or change the Linear filter so only certain labels become tickets. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Gmail Trigger
Set up the incoming email trigger so the workflow starts whenever a new message arrives, and ensure batching is ready to process messages in sequence.
- Open Incoming Email Trigger and set Poll Times to
everyMinute(already configured). - Leave simple set to
falseso full email payloads are available for downstream nodes. - Credential Required: Connect your Google Gmail credentials in Incoming Email Trigger.
- Confirm the flow from Incoming Email Trigger to Batch Email Queue so new emails enter the batching loop.
⚠️ Common Pitfall: If the Gmail trigger has no credentials, the workflow will never start even if the rest of the nodes are configured correctly.
Step 2: Connect GotoHuman Data Sources
These nodes pull prior review examples for classification and drafting context. They are required to build prompt context used by the AI agents.
- Open Retrieve Classifier Examples and keep URL set to
https://api.gotohuman.com/fetchResponses. - Ensure Send Query is enabled and the query parameters include fieldIds set to
meta.emailText,classificationand approvedValuesOnly set totrue. - Credential Required: Connect your gotoHumanApi credentials in Retrieve Classifier Examples.
- Open Retrieve Reply Examples and verify filterResponseValues contains the expression
{{ [ { "field": "classification.value", "operation": "==", "value": $json.output.classifiedAs } ].toJsonString() }}. - Credential Required: Connect your gotoHumanApi credentials in Retrieve Reply Examples.
⚠️ Common Pitfall: Leaving formId empty in the GotoHuman queries will return no examples. Populate it with your review form ID before production.
Step 3: Set Up AI Classification and Drafting
Configure the AI models and agents that classify emails, generate draft replies, and prepare ticket details for bugs and feature requests.
- In Primary Chat Model, select the model
gpt-5-nanoas configured. - Credential Required: Connect your OpenAI credentials in Primary Chat Model (credentials are required on the model node, not on Email Category Analyzer).
- In Secondary Chat Model, select the model
gpt-5-nanoand connect OpenAI credentials (used by Draft Reply Generator). - In Ticket LLM Model, select
gpt-5-nanoand connect OpenAI credentials (used by Ticket Drafting Agent). - Open Email Category Analyzer and keep the text field expression set to
=From: {{ $('Batch Email Queue').item.json.text }} To: {{ $('Batch Email Queue').item.json.to.text }} Subject: {{ $('Batch Email Queue').item.json.subject }} Body: {{ $('Batch Email Queue').item.json.text }}. - Confirm Classification Parser uses the manual schema with
classifiedAsenum andimportantboolean. This parser is attached to Email Category Analyzer; credentials are managed by the model node, not the parser. - Open Draft Reply Generator and keep the text field expression set to
=From: {{ $('Batch Email Queue').item.json.from.text }} To: {{ $('Batch Email Queue').item.json.to.text }} Subject: {{ $('Batch Email Queue').item.json.subject }} Body: {{ $('Batch Email Queue').item.json.text }}. - Confirm Draft Output Parser uses
{"textEmailDraft": "Hello Jack..."}as the structured output example. Credentials are managed by Secondary Chat Model, not the parser. - Open Ticket Drafting Agent and keep the prompt text expression intact to include classification, subject, and text from Batch Email Queue.
- Confirm Ticket Output Parser uses the manual schema with required fields
title,description, andpriority. Credentials are managed by Ticket LLM Model, not the parser.
{{ $json?.fields?.['emailReply']?.length ? ("Here are some previous email replies for emails of the same category to use as reference:\n\n---\n" + $json?.fields?.['emailReply'].join("\n---\n") + "\n---") : "" }}.Step 4: Configure Human Review and Routing
Human review ensures the AI draft and classification are approved, rejected, or sent back for revision, and directs the workflow to reply or create a ticket.
- Open Human Review Task and ensure fields.value.email uses
={{ $('Batch Email Queue').item.json.textAsHtml }}and fields.value.emailReply uses={{ $json.output?.textEmailDraft ? {ai: {prompt: $('Compose Prompt Text').item.json.prompt}, content: $json.output?.textEmailDraft} : "No reply needed - FYI only" }}. - Credential Required: Connect your gotoHumanApi credentials in Human Review Task.
- Verify Reviewer Decision routes
approvedto Test Run Switch,rejectedto Skip Action, andchatto Update Draft Prompt. - Keep Update Draft Prompt assignments so prompt uses
={{ $json.messages[0].content || $('Compose Prompt Text').item.json.prompt }}and reviewToUpdate uses={{ $json.reviewId }}. - Confirm the routing order: Draft Reply Generator → Human Review Task → Reviewer Decision → Test Run Switch.
⚠️ Common Pitfall: If reviewTemplateID is not set in Human Review Task, GotoHuman cannot render the review form and no approvals will occur.
Step 5: Configure Output Actions (Replies and Tickets)
Approved replies are sent to Gmail, and bugs/feature requests are turned into Linear tickets.
- Open Send Thread Reply and confirm Operation is
reply, Message is={{ $('Human Review Task').item.json.responseValues.emailReply.value }}, and Message ID is={{ $('Incoming Email Trigger').item.json.id }}. - Credential Required: Connect your Google Gmail credentials in Send Thread Reply.
- Verify Filter Bug or Feature uses the condition expression
={{ ["bug_report", "feature_request"].includes($('Human Review Task').item.json.responseValues.classification.value) }}. - Open Create Linear Issue and set Team ID to your Linear team identifier (replace
[YOUR_ID]). - Confirm Create Linear Issue fields are mapped to
={{ $json.output.title }},={{ $json.output.priority }}, and={{ $json.output.description }}. - Credential Required: Connect your Linear credentials in Create Linear Issue.
Step 6: Configure Manual Testing Inputs
Use the seeded email data to test end-to-end processing without real Gmail messages.
- Use Manual Run Starter to initiate test runs without Gmail.
- Confirm Manual Run Starter connects to Seed Emails Batch Two and then to Batch Email Queue.
- Review Utility: Seed Test Emails and Seed Emails Batch Two data to ensure
[YOUR_EMAIL]placeholders are replaced with your test address if needed.
⚠️ Common Pitfall: If you test only with Manual Run Starter, Test Run Switch will follow the Test Run branch (no real Gmail thread reply), which is expected behavior.
Step 7: Test and Activate Your Workflow
Run a full test to validate classification, human review, reply sending, and ticket creation, then activate the workflow for production.
- Click Execute Workflow on Manual Run Starter to process seeded emails through Batch Email Queue.
- Verify that Email Category Analyzer classifies emails and Draft Reply Generator produces a draft that appears in Human Review Task.
- Approve a review in Human Review Task and confirm it routes through Reviewer Decision to Test Run Switch.
- For real emails, ensure Incoming Email Trigger is executed so Test Run Switch sends replies via Send Thread Reply.
- Confirm bug/feature classifications pass Filter Bug or Feature and create tickets in Create Linear Issue.
- Once successful, toggle the workflow to Active to enable production processing from Incoming Email Trigger.
Troubleshooting Tips
- Gmail credentials can expire or need specific permissions. If things break, check the Gmail connection in n8n Credentials and confirm the account still has access to the mailbox.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
About 45 minutes if your accounts and keys are ready.
No. You’ll mainly connect Gmail, Linear, OpenAI, and gotoHuman, then adjust categories and prompts.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually a few cents per email depending on message length.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. You can expand the classifier categories in the Email Category Analyzer prompt, change how the Draft Reply Generator writes for each category, and adjust the “Filter Bug or Feature” logic to include things like “Urgent Incident” or “Churn Risk.” If you want tickets for billing problems too, route that category into the Ticket Drafting Agent and map it to a different Linear team or label. The workflow is built for this kind of tailoring.
Usually it’s expired OAuth access or the wrong Gmail account connected. Reconnect Gmail in n8n Credentials, then double-check the trigger is watching the mailbox/label you expect. If replies aren’t sending, confirm the Send Thread Reply node is using the same account and has permission to send as that address. Less common, but real: Google can flag new automations, so check the account security notifications too.
Plenty for most small teams: dozens to a few hundred emails a day is normal, assuming your OpenAI limits are set appropriately.
Often, yes, because this isn’t just “send data from A to B.” You’ve got branching logic, structured parsing, batching, a human review step, and self-learning behavior based on approved examples. n8n handles that kind of workflow without turning every branch into a pricing upgrade, and you can self-host if execution volume grows. Zapier or Make can still be fine for a lightweight version (simple labels, no review, basic ticket creation). But if you care about tone, consistency, and not spamming customers with bad drafts, the human-in-the-loop design matters. Talk to an automation expert if you’re not sure which fits.
This is how you keep your inbox from running your product team. Set it up once, then let Gmail, AI, and Linear do the repetitive work while you make the calls that actually need a human.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.