Skip to main content

Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail

Workflow preview

Workflow preview
100%
Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow receives CI/CD failure webhooks, classifies severity by branch, uses OpenAI to generate a root cause diagnosis and remediation, then alerts Slack, creates a Linear issu...

Best for

  • DevOps automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.slack, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Avkash Kakdiya.

Original n8n.io source

1.1 Workflow description

Title
Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail
Workflow name
Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail

Quick Overview

This workflow receives CI/CD failure webhooks, classifies severity by branch, uses OpenAI to generate a root-cause diagnosis and remediation, then alerts Slack, creates a Linear issue, logs the incident to Google Sheets, and emails a summary via Gmail.

How it works

  1. Receives a POST webhook from your CI/CD system with pipeline run status and metadata.
  2. Parses the payload to extract status, pipeline name, branch, commit details, error log, and run URL, and drops malformed events.
  3. Filters out non-failure runs and assigns a severity level and Linear priority based on the branch.
  4. Sends the error log and context to OpenAI to return a JSON diagnosis, remediation step, and rollback recommendation.
  5. Posts a Slack alert to the on-call channel for Critical incidents and posts all incidents to a developer Slack channel.
  6. Creates a Linear issue with the failure context and AI diagnosis, appends the incident to a Google Sheets log, and emails a Gmail HTML summary to the engineering lead.

Setup

  1. Copy the workflow’s webhook URL and configure your CI/CD platform (for example GitHub Actions, GitLab CI, or CircleCI) to POST failure events to it.
  2. Add credentials for OpenAI, Slack, Google Sheets, and Gmail, and provide a Linear API key for the Linear GraphQL request.
  3. Replace placeholders for Slack channel IDs, Linear team ID, Google Sheets spreadsheet ID and sheet name, and the engineering lead email address.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Overview Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Section Note 1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Section Note 2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Section Note 3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Pipeline Failure Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 6 - Parse Pipeline Payload

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Is Failure Event

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 8 - Classify Severity

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Extract AI Diagnosis1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.1

Block 10 - Extract AI Diagnosis

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Is Critical Severity

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 12 - Slack On-Call Alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.2

Block 13 - Slack Dev Alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.2

Block 14 - Merge Alerts

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 15 - Create Linear Issue

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Log to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 17 - Send Gmail Summary

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

3. Summary Table

Workflow Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail
Complexity advanced
Nodes 17
Categories DevOps, AI Summarization
Author Avkash Kakdiya
Published 16 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16402/16402.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail do?

Quick Overview This workflow receives CI/CD failure webhooks, classifies severity by branch, uses OpenAI to generate a root cause diagnosis and remediation, then alerts Slack, creates a Linear issu...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, AI Summarization use case.