## Introduction
In operations, timely handling of high-priority issues is critical to maintaining system reliability and customer satisfaction. However, manual triaging of issues across multiple platforms can delay response times, leading to operational inefficiencies. This guide demonstrates how to build an automated workflow using n8n to identify, filter, and route high-priority issues directly to the operations (ops) team. This automation benefits Operations Engineers and Incident Managers by accelerating issue awareness and reducing manual overhead.
## Tools and Services Integrated
– **n8n:** An open-source automation platform used to build the workflow.
– **GitHub Issues:** As an example source of incoming issues where priority labels are set.
– **Slack:** To notify and alert the ops team in a dedicated Slack channel.
– **Google Sheets:** For logging issues automatically to maintain a historical record.
This workflow can be adapted for other issue tracking tools like Jira, Zendesk, or email-based tickets.
—
## High-Level Workflow Overview
1. **Trigger:** New issue is created or updated on GitHub Issues.
2. **Filter:** Check if the issue is labeled with ‘high-priority’ (or similar label).
3. **Notify:** Send a detailed message to the ops Slack channel.
4. **Log:** Append issue data to a Google Sheet for record-keeping.
—
## Step-by-Step Technical Tutorial
### Step 1: Set Up n8n and Authenticate Services
– Sign up and log in to n8n.
– Connect your GitHub account via OAuth or Personal Access Token.
– Connect Slack workspace (ensure you have bot token with chat:write scope).
– Connect Google Sheets via OAuth and set up access to a spreadsheet for logging.
### Step 2: Create a New n8n Workflow
1. Create a blank workflow and name it accordingly, e.g., “High-Priority Issue Router.”
### Step 3: Add GitHub Trigger Node
– Add the **GitHub Trigger** node.
– Configure it to listen for the **Issue** event.
– Select trigger actions as **opened** and **labeled** (to capture new issues and label updates).
– Choose the repository to monitor.
### Step 4: Add Filter Node to Check Priority Label
– Use the **IF** node to examine if the incoming issue contains the ‘high-priority’ label.
**Configuration details:**
– Condition: `{{$json[“issue”][“labels”].some(label => label.name === ‘high-priority’)}}`
– Path 1 (true): proceed with notification and logging.
– Path 2 (false): end. No action.
### Step 5: Construct the Slack Notification Node
– Add **Slack** node.
– Operation: Send Message.
– Channel: Ops team Slack channel (e.g. `#ops-alerts`).
– Customize the message with issue details using expressions:
  “`
  *High-Priority Issue Alert!*
  – Title: {{ $json[“issue”][“title”] }}
  – Created by: {{ $json[“issue”][“user”][“login”] }}
  – URL: {{ $json[“issue”][“html_url”] }}
  – Description: {{ $json[“issue”][“body”] || ‘No description provided.’ }}
  “`
Include buttons or links if your Slack workspace supports it.
### Step 6: Append Issue Data to Google Sheets
– Add **Google Sheets** node.
– Operation: Append Row.
– Select the spreadsheet and sheet where logs should be stored.
– Map the following columns:
  – Issue ID: `{{ $json[“issue”][“id”] }}`
  – Title: `{{ $json[“issue”][“title”] }}`
  – Priority: `High`
  – Created By: `{{ $json[“issue”][“user”][“login”] }}`
  – Created At: `{{ $json[“issue”][“created_at”] }}`
  – URL: `{{ $json[“issue”][“html_url”] }}`
### Step 7: Connecting the Nodes
– Connect **GitHub Trigger** node output to **IF** node input.
– Connect the true output of **IF** node to **Slack** node.
– Chain **Slack** node output to **Google Sheets** node.
### Step 8: Activate and Test the Workflow
– Activate the workflow.
– Create a new issue with the label “high-priority” in the linked GitHub repository.
– Confirm Slack notification appears.
– Verify the Google Sheet has the new row appended.
—
## Common Errors and Tips to Enhance Robustness
– **Authentication Errors:** Always recheck OAuth tokens if nodes fail to connect.
– **Label Name Sensitivity:** Label matching is case-sensitive; ensure label spelling is exact.
– **Slack Rate Limits:** For high volume, consider batching messages or using Slack’s workflow steps.
– **Error Handling:** Use the **Error Trigger** node in n8n to catch failures and send alerts.
– **Retries:** Enable automatic retry on nodes that occasionally fail due to network issues.
—
## Scaling and Adaptations
– **Multi-source Integration:** Add triggers from Jira, Zendesk, or email systems, normalizing the priority field.
– **Dynamic Routing:** Notify different ops teams based on issue tags or components.
– **Priority Escalation:** If an issue remains open beyond SLA, automatically escalate via Slack DM or SMS.
– **Dashboard Integration:** Send aggregated metrics to dashboards like Grafana or Datadog.
—
## Summary
Automating routing of high-priority issues ensures the ops team responds swiftly, reducing downtime and operational risk. Using n8n, you can seamlessly connect issue tracking tools, communication platforms, and record systems. The modular design allows for easy expansion, adjusting for multiple issue sources and escalation policies.
—
## Bonus Tip: Implement SLA Monitoring
Extend the workflow by querying the logged issues in Google Sheets daily. Use the n8n **Cron** node to trigger a query that identifies any high-priority issue not updated or closed within the predefined SLA window. For these, send escalation alerts automatically. This proactive monitoring turns your automation into a comprehensive incident management tool.