Automate Slack Ticket Creation with n8n, Linear & ChatGPT

This n8n workflow automates creating support tickets from Slack messages tagged with a ticket emoji by leveraging Linear and OpenAI’s ChatGPT. It eliminates duplicate tickets and generates detailed ticket content, saving support teams hours each week.
slack
lmChatOpenAi
linear
+8
Learn how to Build this Workflow with AI:
Workflow Identifier: 1085
NODES in Use: Slack, OpenAI Chat Model, Structured Output Parser, Schedule Trigger, Sticky Note, Set, If, Linear, Merge, Aggregate, Chain LLM

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Sarah, a seasoned customer support manager for a fast-growing SaaS company. Every day, Sarah scours her team’s Slack channel, #n8n-tickets, hunting for user messages marked with the ticket emoji (🎫) that indicate issues needing support. With dozens of such messages coming in daily, manually tracking these and creating tickets in Linear not only eats into her valuable time but also leads to errors like duplicate tickets or incomplete issue descriptions. Sarah estimates she spends nearly 5 hours every week just organizing and triaging these requests—time that could be better spent actually resolving them.

This exact problem is what the n8n workflow we’re diving into solves. It automatically watches the Slack channel for new ticket requests, intelligently checks if tickets already exist to prevent duplicates, uses powerful AI (OpenAI’s ChatGPT) to generate comprehensive and prioritized ticket details, and seamlessly creates structured tickets in Linear. This automation not only speeds up Sarah’s workflow dramatically but also improves ticket quality and consistency.

2. What This Automation Does

This n8n workflow acts like an attentive personal assistant for Slack support teams. When active, it:

  • Monitors a specific Slack channel (#n8n-tickets) for new messages tagged with the ticket emoji (🎫).
  • Extracts key information from each message such as the text, user name, message permalink, and timestamp.
  • Checks Linear for already existing tickets linked to the Slack message to avoid duplicates by comparing unique message IDs.
  • Uses ChatGPT to generate a detailed ticket title, actionable summary, suggested troubleshooting ideas, and a priority level based on the message’s context.
  • Automatically creates a new well-structured support ticket in Linear, embedding the original message, metadata, and AI-generated content.
  • Saves support teams hours per week by automating mundane ticket creation and improving issue clarity and prioritization.

3. Prerequisites ⚙️

  • n8n account (cloud or self-hosted)
    Optionally self-host with providers like Hostinger.
  • Slack account with API access and a channel for support tickets (#n8n-tickets in this case).
  • Linear account to manage support tickets (need API credentials).
  • OpenAI account with API key for ChatGPT usage.

4. Step-by-Step Guide

Step 1: Set Up the Schedule Trigger Node

Navigate to n8n, click + New Workflow, then add a Schedule Trigger node. Configure it to run at your desired interval—in this workflow, it’s set to trigger every minute.

What to expect: This node initiates the workflow repeatedly, ensuring fresh Slack messages are processed promptly.

Tip: Avoid intervals that are too frequent to prevent API rate limits.

Step 2: Query Slack for Ticket Messages

Add a Slack node next. Configure it to search messages in the desired channel, filtering with the query in:#n8n-tickets has::ticket: to find messages tagged with the 🎫 emoji.

What to expect: You should see an array of message objects with details like text, permalink, username, and more.

Tip: Ensure your Slack API credentials are correctly set and have search permission.

Step 3: Extract and Format Slack Message Data

Use a Set node named Get Values to pick and format relevant fields from the Slack messages. This includes extracting the message ID from the permalink, channel, user info, timestamp, and sanitized message text.

Example JSON output configuration (as used in this workflow):

{
  "id": "#{{ $json.permalink.split('/').last() }}",
  "type": "{{ $json.type }}",
  "title": "__NOT_SET__",
  "channel": "{{ $json.channel.name }}",
  "user": "{{ $json.username }} ({{ $json.user }})",
  "ts": "{{ $json.ts }}",
  "permalink": "{{ $json.permalink }}",
  "message": "{{ $json.text.replaceAll('"','\"').replaceAll('n', '\n') }}"
}

This structure prepares data neatly for later processing.

Step 4: Get Existing Issues from Linear

Add the Linear node configured with getAll operation to fetch all existing tickets so we can check for duplicates.

What to expect: A list of current tickets, including descriptions that will contain references to Slack message IDs.

Step 5: Aggregate Existing Ticket Descriptions

Use the Aggregate node (Collect Descriptions) to collect all the descriptions from fetched tickets.

Step 6: Extract Hashes (Message IDs) from Descriptions

Use another Set node (Get Hashes Only) to extract the Slack message IDs included in the existing tickets’ descriptions. This helps identify which Slack messages already have a ticket.

Step 7: Merge Slack Messages and Existing Hashes

Use the Merge node to combine the freshly fetched Slack messages with the existing ticket hashes, allowing for a comparison.

Step 8: Check if New Ticket Is Needed

Add an If node (Create New Ticket?) to evaluate if the Slack message ID is already in the hashes array. If the ID is not found, it routes the item forward for ticket creation.

Step 9: Generate Ticket Content Using ChatGPT

Pass the message to the OpenAI Chat Model node, linked to the Chain LLM node (Generate Ticket Using ChatGPT), with a prompt that instructs the AI to:

  • Create a descriptive, concise title (max 10 words).
  • Summarize the issue focusing on user expectations and attempts.
  • Suggest up to 3 troubleshooting ideas.
  • Determine priority based on urgency clues, defaulting to “low” if unclear.

The workflow uses the Structured Output Parser node to enforce a JSON schema, ensuring the AI response fits the expected format.

Step 10: Create Ticket in Linear

Finally, the Linear node (Create Ticket) uses the AI-generated content to create a new ticket. It sets the title, description (including suggestions and original message), and the priority mapped from the AI output.

Example ticket description formatting:

## SummaryText

### Suggestions
* Suggestion 1
* Suggestion 2

## Original Message
User asks:
> Message Text

### Metadata
channel: channelName
ts: timestamp
permalink: url
hash: messageId

5. Customizations ✏️

  • Change Slack Channel: In the Slack node, update the query parameter from in:#n8n-tickets to your team’s channel (e.g., in:#support-requests). This reroutes the ticket creation automation accordingly.
  • Adjust Ticket Priority Mapping: In the Create Ticket node, alter the priority ID map based on your Linear setup or add custom priority categories.
  • Modify AI Prompt for Ticket Details: Edit the prompt text in the Generate Ticket Using ChatGPT node to include other deliverables or emphasis areas (e.g., ask ChatGPT to detect sentiment or recommend escalation).
  • Include Additional Metadata: Add more Slack message metadata in the Get Values node or when creating the ticket, such as thread IDs or attachments, to enrich ticket context.

6. Troubleshooting 🔧

  • Problem: “Slack API rate limit exceeded”
    Cause: Running the Schedule Trigger too frequently or large search queries.
    Solution: Increase interval in Schedule Trigger node; limit Slack search results size.
  • Problem: “No tickets created despite messages with 🎫 emoji”
    Cause: Slack message IDs already recorded in existing ticket hashes.
    Solution: Check the Get Hashes Only node’s regex and ensure message IDs are correctly extracted from ticket descriptions.
  • Problem: “Linear API authentication fails”
    Cause: Expired or incorrect API credentials.
    Solution: Re-authorize or update API keys in n8n credentials.

7. Pre-Production Checklist ✅

  • Verify Slack API credentials and permissions include message search access.
  • Confirm the correct Slack channel is set in the Slack node query string.
  • Test that Linear API credentials allow ticket creation and retrieval.
  • Validate OpenAI API key works, and usage limits are sufficient.
  • Run test messages in Slack channel with 🎫 emoji and confirm tickets generate in Linear.
  • Back up workflow settings before deployment.

8. Deployment Guide

Activate the workflow by toggling it on in n8n. Keep an eye on execution logs to monitor for errors or skipped messages. Adjust schedule intervals to balance timely processing without hitting API limits. Use n8n’s built-in retry and error handling features to handle transient API failures gracefully.

9. FAQs

Can I use another AI model instead of OpenAI’s ChatGPT?

Yes, as long as the model supports similar prompt and JSON output parsing, you can replace the OpenAI Chat Model node with alternatives compatible with n8n.

Does this workflow consume OpenAI API credits?

Yes, each ticket content generation consumes tokens. Plan usage accordingly.

Is the data secure?

All connections use API keys securely stored in n8n credentials and data is processed within your environment.

Can this handle high volumes of Slack messages?

Yes, but you may need to scale up the workflow trigger frequency and ensure API rate limits are respected.

10. Conclusion

By completing this setup, you’ve automated an essential part of your support process: turning Slack messages into actionable Linear tickets augmented with AI-generated insights. Sarah’s team can now save hours weekly, reduce duplicate tickets, and deliver clearer issue reports to engineers.

Next, consider expanding this automation by integrating notifications to support channels in Slack or adding escalation rules based on priority. You might also explore automatic ticket closure workflows after resolution.

With this automation, you’re not just saving time—you’re elevating your entire customer support experience.

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free