Animated data flow diagram

AI Agent: Linear Issue Sentiment Tracker & Negative Trend Alerter

Version: 1.0.0 | Last Updated: 2025-05-16

Integrates with:

Linear OpenAI Airtable Slack

Overview

Unlock Proactive Issue Management with this AI Agent

This n8n AI agent automates the critical task of monitoring sentiment within your Linear.app issue discussions. It connects to Linear, fetches recently updated issues, and then employs OpenAI's language understanding capabilities (specifically through the Langchain Information Extractor node) to analyze the sentiment of comments. Is the conversation positive, neutral, or turning negative? This agent finds out.

The analyzed sentiment, along with a summary, is systematically logged in an Airtable base. This creates a valuable historical record of sentiment per issue, allowing you to track trends. Most importantly, if an issue's sentiment shifts from a non-negative state to negative, the agent immediately sends a configurable alert to a designated Slack channel. This enables your team to intervene early, address concerns, and potentially prevent minor issues from escalating.

Key Features & Benefits

  • Continuous Linear Issue Monitoring: Automatically fetches recently updated issues from your Linear.app workspace on a schedule (e.g., every 30 minutes).
  • AI-Powered Sentiment Analysis: Leverages OpenAI (via n8n's Langchain Information Extractor & OpenAI Chat Model nodes) to accurately determine sentiment (positive, negative, neutral) and generate a sentiment summary from issue comment threads.
  • Sentiment Trend Logging in Airtable: Systematically records current and previous sentiment for each issue in Airtable, building a history for trend analysis and review.
  • Proactive Negative Sentiment Alerts: Instantly notifies your team via Slack when an issue's sentiment transitions to negative, helping prioritize attention where it's needed most.
  • Smart Deduplication: Prevents alert fatigue by ensuring notifications for the same issue update are not sent repeatedly.
  • Customizable & Extensible: Easily adapt the Linear issue filters, Airtable structure, OpenAI model, and Slack notification content to fit your specific team and workflow needs.
  • Data-Driven Insights: Provides a structured way to understand the emotional tone of your issue management process, aiding in identifying areas for improvement in support or development.

Use Cases

  • Automatically flag customer support tickets in Linear that are showing signs of frustration or dissatisfaction.
  • Monitor engineering tasks or bug reports for negative sentiment that might indicate developer roadblocks or critical issues.
  • Track sentiment shifts in product feedback issues to quickly gauge user reactions to new features or changes.
  • Provide team leads/managers with automated alerts for issues requiring urgent attention due to negative sentiment, without manual monitoring.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • Linear.app API Key: A Personal API Token from your Linear settings (Settings > API > Personal API Keys).
  • OpenAI API Key with access to a suitable model (e.g., gpt-3.5-turbo, gpt-4). This will be used by the Langchain nodes.
  • Airtable Personal Access Token and an Airtable Base. An example base structure is referenced in the workflow's original notes (URL: https://airtable.com/appViDaeaFw4qv9La/shrq6HgeYzpW6uwXL). Your base should include at least these fields: Issue ID (Text, unique), Current Sentiment (Single Select options: Positive, Negative, Neutral), Previous Sentiment (Single Select options: Positive, Negative, Neutral, N/A), Summary (Long Text), Issue Title (Text), Issue Created (Date/Time), Issue Updated (Date/Time), Assigned (Text).
  • Slack API credentials (Bot Token for the n8n Slack app/integration) and a configured Slack connection in n8n.

Setup Instructions

  1. Download the n8n workflow JSON file.
  2. Import the workflow into your n8n instance.
  3. Schedule Trigger: Select the 'Schedule Trigger' node. Adjust the 'Trigger Interval' (e.g., 'Minutes') to your desired monitoring frequency (default is every 30 minutes).
  4. Linear Connection ('Fetch Active Linear Issues' node):
    • This node uses GraphQL. Select it.
    • Under 'Authentication', choose 'Header Auth'. Click 'Create New' for credentials if you don't have one for Linear.
    • In the credential configuration: Name it (e.g., 'Linear API Key'). For 'Name' (header name), enter Authorization. For 'Value' (header value), enter Bearer YOUR_LINEAR_API_KEY (replace YOUR_LINEAR_API_KEY with your actual Personal API Token from Linear).
    • Review and, if necessary, adjust the GraphQL query or variables (e.g., the updatedAt filter) to target the specific Linear issues relevant to your team or project.
  5. OpenAI Connection ('OpenAI Chat Model' node):
    • Select this node.
    • Under 'Credential for OpenAI API', choose an existing credential or create a new one using your OpenAI API Key.
  6. Airtable Configuration (for 'Get Existing Sentiment' and 'Update Row' nodes):
    • For both Airtable nodes, select an existing Airtable credential or create a new one using your Airtable Personal Access Token.
    • Enter your specific Airtable 'Base ID' and 'Table ID' where sentiment data will be stored and retrieved.
    • In the 'Update Row' node, carefully review the 'Columns' mapping. Ensure the 'Value' expressions (n8n data) are correctly mapped to your Airtable 'Name' (field names). The Issue ID field is crucial for matching records in the 'Upsert' operation; ensure this field is unique in your Airtable table.
  7. Airtable Trigger Configuration ('Airtable Trigger' node):
    • This node starts a separate execution path for sending Slack notifications.
    • Configure its Airtable credentials, 'Base ID', and 'Table ID' (typically the same as in step 6).
    • Ensure the 'Trigger Field' under 'Options' is correctly set to the name of your 'Current Sentiment' column in Airtable.
  8. Slack Notification ('Report Issue Negative Transition' node):
    • Select this node.
    • Choose an existing Slack credential or create a new one.
    • Under 'Channel ID', select the specific Slack channel where you want alerts to be posted.
    • Customize the notification message in the 'Blocks UI' parameter. Important: The default message includes a Linear issue URL like https://linear.app/myOrg/issue/.... Replace myOrg with your actual Linear organization's slug.
  9. Activate Workflows: Activate the main workflow (the one starting with the 'Schedule Trigger'). Then, activate the workflow branch that begins with the 'Airtable Trigger' (you may need to activate it separately by opening it if it's a sub-workflow, or ensure it's part of the main active workflow).

Tags:

AI AgentSentiment AnalysisLinear.appOpenAIAirtableSlackIssue TrackingCustomer SupportAutomationDevOpsProductivityLangchain

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Schedule a Consultation