Sentiment Analysis Tracking on Support Issues with Linear and Slack n8n Workflow Template

n8n workflow template · 14 nodes · OpenAI

Sentiment Analysis Tracking on Support Issues with Linear and Slack is a free n8n workflow template that starts from the Airtable Trigger node and works with OpenAI, Airtable and Slack. It has 14 nodes, 2 of them AI nodes (OpenAI Chat Model and Information Extractor). The notes inside the workflow say: “To keep up with the latest changes in our active Linear tickets, we'll need to use Linear's GraphQL endpoint because filtering is currently unavailable in the official Linear.app node.” To run it, you add your own credentials for Airtable API, HTTP Header Auth, OpenAI API and Slack API.

At a glance

Trigger
Airtable Trigger (Airtable Trigger)
Nodes
14
Apps
OpenAI, Airtable and Slack
AI nodes
2
Credentials
4 types
Category
Chatbots and messaging

Apps and integrations

  • OpenAI
  • Airtable
  • Slack

Node types used

  • Split Out
  • OpenAI Chat Model
  • Edit Fields (Set)
  • Information Extractor
  • Loop Over Items
  • Airtable
  • Airtable Trigger
  • Switch
  • GraphQL
  • Schedule Trigger
  • Remove Duplicates
  • Slack

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.

1. Continuously Monitor Active Linear Issues

Learn more about the GraphQL node

To keep up with the latest changes in our active Linear tickets, we'll need to use Linear's GraphQL endpoint because filtering is currently unavailable in the official Linear.app node.

For this demonstration, we'll check for updated tickets every 30mins.

2. Sentiment Analysis on Current Issue Activity

Learn more about the Information Extractor node

With our recently updated posts, we can use our AI to perform a quick sentiment analysis on the ongoing conversation to check the overall mood of the support issue. This is a great way to check how things are generally going in the support queue; positive should be normal but negative could indicate some uncomfortableness or even frustration.

4. Get Notified when Sentiment becomes Negative

Learn more about the Slack node

A good use-case for tracking sentiment transitions could be to be alerted if ever an issue moves from a non-negative sentiment to a negative one. This could be a signal of issue handling troubles which may require attention before it escalates.

In this demonstration, we use the Airtable trigger to catch rows which have their sentiment column updated and check for the non-negative-to-negative sentiment transition using the switch node. For those matching rows, we combine add send a notification via slack. A cool trick is to use the "remove duplication" node to prevent repeat notifications for the same updates - here we combine the Linear issue key and the row's last modified date.

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.

Try It Out!

This n8n template performs continous monitoring on Linear Issue conversations performing sentiment analysis and alerting when the sentiment becomes negative.

This is helpful to quickly identify difficult customer support situations early and prioritising them before they get out of hand.

How it works

  • A scheduled trigger is used to fetch recently updated issues in Linear using the GraphQL node.
  • Each issue's comments thread is passed into a simple Information Extractor node to identify the overall sentiment.
  • The resulting sentiment analysis combined with the some issue details are uploaded to Airtable for review.
  • When the template is re-run at a later date, each issue is re-analysed for sentiment
  • Each issue's new sentiment state is saved to the airtable whilst its previous state is moved to the "previous sentiment" column.
  • An Airtable trigger is used to watch for recently updated rows
  • Each matching Airtable row is filtered to check if it has a previous non-negative state but now has a negative state in its current sentiment.
  • The results are sent via notification to a team slack channel for priority.

Check out the sample Airtable here

How to use

  • Modify the GraphQL filter to fetch issues to a relevant issue type, team or person.
  • Update the Slack channel to ensure messages are sent to the correct location.

Need Help?

Join the Discord or ask in the Forum!

3. Capture and Track Results in Airtable

Learn more about the Airtable node

Next, we can capture this analysis in our insights database as means for human review. When the issue is new, we can create a new row but if the issue exists, we will update it's existing row instead.

When updating an existing row, we move its previous "current sentiment" value into the "previous sentiment" column and replace with our new current sentiment. This gives us a "sentiment transition" which will be useful in the next step.

Check out the Airtable here

Nodes in this workflow

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

  1. Issues to List (Split Out)
  2. OpenAI Chat Model (OpenAI Chat Model)
  3. Combine Sentiment Analysis (Edit Fields (Set))
  4. Sentiment over Issue Comments (Information Extractor)
  5. Copy of Issue (Edit Fields (Set))
  6. For Each Issue... (Loop Over Items)
  7. Get Existing Sentiment (Airtable)
  8. Update Row (Airtable)
  9. Airtable Trigger (Airtable Trigger)
  10. Sentiment Transition (Switch)
  11. Fetch Active Linear Issues (GraphQL)
  12. Schedule Trigger (Schedule Trigger)
  13. Deduplicate Notifications (Remove Duplicates)
  14. Report Issue Negative Transition (Slack)

Credentials you need

  • Airtable API – used by Airtable Trigger, Get Existing Sentiment and Update Row
  • HTTP Header Auth – used by Fetch Active Linear Issues
  • OpenAI API – used by OpenAI Chat Model
  • Slack API – used by Report Issue Negative Transition

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