What this workflow does
This workflow reads new emails sent to a support inbox every hour.
It uses AI to sort emails by type and urgency.
Then it makes clear tickets in a Linear issue tracker with labels, priority, and cleaned-up text.
This saves time and stops errors from manual work.
Who should use this workflow
Teams who get many support emails daily.
People who want to quickly organize and act on customer issues.
Anyone using Gmail for support and Linear for issue tracking.
Tools and services used
- Gmail: sources support emails.
- OpenAI GPT-4o-mini model: analyzes and categorizes emails.
- Linear API: creates tickets in the issue tracker.
- n8n automation: connects all steps inside a workflow.
Inputs, processing steps, and outputs
Inputs
- Support emails from Gmail inbox filtered by recipient address.
- OpenAI API key for AI processing.
- Linear API credentials for ticket creation.
Processing Steps
- Trigger runs every hour to check new emails.
- Fetch emails addressed to support inbox using Gmail node.
- Remove duplicate emails already processed.
- Convert email HTML to markdown for clearer AI reading.
- Send email content to GPT-4o-mini in OpenAI Chat Model node for classification, priority assignment, and summary rewriting.
- Parse AI response into structured fields: labels, priority, summary, description.
- Use Chain LLM node to refine classification and summary using a detailed prompt.
- Create an issue in Linear with title, description, labels, and priority from AI output.
Outputs
- Well-labeled, prioritized issues in Linear for the support team.
- Reduced ticket duplication and faster triage.
- Consistent ticket summaries keeping only facts and key info.
Beginner step-by-step: How to use this workflow in n8n
Import and setup
- Download the workflow file using the Download button provided on this page.
- Inside the n8n editor, click Import from File and upload the downloaded workflow.
Configure credentials and data
- Add your Gmail OAuth2 credentials in the Gmail node.
- Set your OpenAI API Key in the OpenAI Chat Model and Chain LLM nodes.
- Update Linear node settings: enter your teamId and stateId from your Linear account.
- If needed, change the support email address in the Gmail node filter.
Testing and activation
- Run the workflow once manually to check it fetches emails, sends to AI, and creates issues in Linear.
- Fix any errors found in credentials or IDs.
- When tests pass, activate the workflow using the toggle switch in n8n to run hourly.
You can reconsider hosting options if you run your own server. For help with self-host n8n options, visit the linked page.
Common edge cases and failures
- Email fetch can fail if the Gmail filter uses wrong syntax or OAuth2 token expires.
- AI output can be unstructured if the parsing schema mismatches or the prompt is unclear.
- Linear issue creation fails if team or state ID is invalid or missing.
- Duplicate emails cause repeated tickets if deduplication is not set or incorrect.
Customization ideas
- Add more labels inside the AI prompt to fit specific team vocabulary.
- Run the schedule trigger more often for quicker email processing.
- Filter emails more precisely on subject or sender in Gmail node.
- Add Slack notification node after Linear to alert the team on urgent tickets.
- Include due dates or assignees in the Linear issue creation fields.
Summary
✓ Saves hours daily on manual email triage.
✓ Converts messy emails into clear, prioritized tickets automatically.
✓ Uses AI to ensure consistent labeling and summaries.
✓ Helps support teams fix high priority issues faster.

