Customer Support Channel and Ticketing System with Slack and Linear n8n Workflow Template

n8n workflow template · 12 nodes · Slack

Customer Support Channel and Ticketing System with Slack and Linear is a free n8n workflow template that runs on a schedule and works with Slack, OpenAI and Linear. It has 12 nodes, 3 of them AI nodes (OpenAI Chat Model, Structured Output Parser and Basic LLM Chain). The notes inside the workflow say: “Join the Discord or ask in the Forum!” To run it, you add your own credentials for Linear API, OpenAI API and Slack API.

At a glance

Trigger
Schedule Trigger (Schedule Trigger)
Nodes
12
Apps
Slack, OpenAI and Linear
AI nodes
3
Credentials
3 types
Category
IT, security and DevOps

Apps and integrations

  • Slack
  • OpenAI
  • Linear

Node types used

  • Slack
  • OpenAI Chat Model
  • Structured Output Parser
  • Schedule Trigger
  • Edit Fields (Set)
  • If
  • Linear
  • Basic LLM Chain
  • Merge
  • Aggregate

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Try It Out!

This workflow does the following

  • Monitors a Slack channel for new user messages asking for assistance
  • Only user messages which are tagged with the ticket emoji are processed.
  • Linear is first checked to see if a ticket was created for the user message.
  • User messages are sent to ChatGPT to generate title, description and priority.
  • Support ticket is created in Linear.

Need Help?

Join the Discord or ask in the Forum!

1. Query Slack for Messages

Read more about the Slack Trigger

Slack API search uses the same search syntax found in the app. Here, we'll use it to filter the latest messages with the ticket emoji within our designated channel called #n8n-tickets.

  • Set the Slack channel to monitor here.

3. Use AI to Generate Ticket Contents

Read more about using Basic LLM Chain

For this demo, we've instructed the AI to do the following

  • Generate a descriptive title of the issue
  • Summarise the user message into an actionable request.
  • Determine a prority based on tone and context of the user message.
  • Can offer possible fixes through use of tools or RAG. (not implemented)

4. Create New Ticket in Linear

Read more about using Linear

With our ticket contents generated, we can now create our ticket in Linear for support to handle.

  • Set the Linear Team Name or ID here.

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

2. Decide If We Need to Create a New Ticket

Read more about using Linear

For generated issues, we add the message id to the description of the message so that we can check them at this point in the workflow to avoid duplicates.

Nodes in this workflow

The 12 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Slack (Slack)
  2. OpenAI Chat Model (OpenAI Chat Model)
  3. Structured Output Parser (Structured Output Parser)
  4. Schedule Trigger (Schedule Trigger)
  5. Get Values (Edit Fields (Set))
  6. Create New Ticket? (If)
  7. Get Existing Issues (Linear)
  8. Generate Ticket Using ChatGPT (Basic LLM Chain)
  9. Create Ticket (Linear)
  10. Merge (Merge)
  11. Get Hashes Only (Edit Fields (Set))
  12. Collect Descriptions (Aggregate)

Credentials you need

  • Linear API – used by Create Ticket and Get Existing Issues
  • OpenAI API – used by OpenAI Chat Model
  • Slack API – used by Slack

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us