n8n

How to Automate Gmail to Linear Ticket Management?

Teams get a lot of support emails and need a fast way to turn them into work items. This setup checks a shared Gmail inbox, sorts each message with AI, and opens a clear issue in Linear. Support and product groups get ready to work tickets with labels and priority already set.

A schedule runs on a timer and pulls recent messages from Gmail using a search like to:support@example.com. Duplicates are ignored by marking each email id as seen, and the HTML body is converted to markdown for clean reading. An AI model then creates labels, sets a priority score, and rewrites a short title and description using a strict schema so fields are reliable. A chain builds the final content with reporter and time stamps. The result is sent to Linear to create an issue that includes a clear summary and a readable description.

Use your own support address in the Gmail filter and adjust the prompt to list the label names and the priority scale used by your team. Expect less manual triage time, faster handoffs, and a more consistent backlog. Many teams cut daily triage from about 30 minutes to around 5 minutes. This fits groups that route support to engineering or product and want a simple flow that runs all day without babysitting.

What are the key features?

  • Scheduled polling pulls new messages at regular intervals
  • Gmail search filter targets the support address to reduce noise
  • Remove duplicates marks each email id as seen so items are processed once
  • Markdown conversion turns the HTML email body into clean text for parsing
  • AI generates labels, a priority score, a short summary, and a clear description
  • Structured output parser enforces a schema for reliable fields
  • Linear issue creation maps AI output to title, description, labels, and priority

What are the benefits?

  • Reduce manual triage from about 30 minutes a day to around 5 minutes
  • Automate up to 90 percent of repetitive ticket setup tasks
  • Improve labeling and priority accuracy by using a strict schema
  • Connect Gmail and Linear so tickets move without copy paste
  • Handle several times more support volume with the same team

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, OpenAI and Linear. See the Tools Required section above for links to create accounts with these services.
  3. Open the Gmail node in the canvas and create a Gmail OAuth credential. In the credential window choose your Google account and allow read access to email.
  4. Open the OpenAI Chat Model node and create a new OpenAI API Key credential. In your OpenAI account copy your API key from the API page and paste it into n8n.
  5. Open the Linear node and create a new Linear API Key credential. In Linear generate a personal API token in your settings, then paste it into n8n and save.
  6. In the Gmail Get Recent Messages node set the search query to your support address such as to:youralias@domain.com and adjust the limit. Click Execute node to confirm one or more messages are found.
  7. In the Mark as Seen node confirm the dedupe value is set to {{$json.id}}. Run the node twice with the same email to make sure it is ignored on the second run.
  8. Open the Markdown node and confirm the html field uses {{$json.html}}. Execute the node and check that the markdown output is readable.
  9. Open the Generate Issue From Support Request node and edit the system prompt. List the exact labels your team uses and define the priority scale. Make sure the OpenAI model and the structured output parser are selected.
  10. In the Linear Create Issue node map the title to {{$json.output.summary}} and the description to {{$json.output.description}}. Choose the right team and project in Linear, then Execute node to create a test issue.
  11. Set the Schedule Trigger to run on an hourly interval or your preferred cadence. Turn on the workflow, send a test email to the support address, and watch Executions for results. If no emails appear, adjust the Gmail search. If the parser fails, simplify the prompt or ensure the email body is not empty.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Linear

Sign up

Free: $0 / mo, includes API access (2 teams, 250 issues)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.