Skip to main content

Analyze error logs with GPT-4o and create GitHub issues plus Slack alerts

Workflow preview

Workflow preview
100%
Analyze error logs with GPT-4o and create GitHub issues plus Slack alerts preview
Open on n8n.io

1. Workflow Overview

Analyze error logs with AI and auto create GitHub issues with fix suggestions Who is this for DevOps engineers, SREs, and development teams who want to automate error monitoring and reduce mean tim...

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.github, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.slack, n8n-nodes-base.wait

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Analyze error logs with GPT-4o and create GitHub issues plus Slack alerts
Workflow name
Analyze error logs with GPT-4o and create GitHub issues plus Slack alerts

Analyze error logs with AI and auto-create GitHub issues with fix suggestions


Who is this for

DevOps engineers, SREs, and development teams who want to automate error monitoring and reduce mean time to resolution (MTTR). Ideal for teams using GitHub for issue tracking and Slack for incident response.

What this workflow does

This workflow automates the entire error management lifecycle - from log ingestion to GitHub issue creation and Slack notification - using GPT-4o-powered root cause analysis. When an application error log is received, it parses the payload, checks for duplicates against existing GitHub issues, generates a structured root cause analysis with fix suggestions, creates a formatted GitHub Issue, and routes Slack notifications by severity. A 30-minute Wait node prevents notification flooding.

How to set up

  1. Add your GitHub Personal Access Token (repo scope) credential
  2. Add your OpenAI API credential to the AI analysis node
  3. Add your Slack OAuth2 credential (chat:write scope) to all Slack nodes
  4. Configure n8n Variables: GITHUB_OWNER and GITHUB_REPO
  5. Update Slack channel names (#incident / #dev-alerts) to match your workspace
  6. Activate the workflow and copy the webhook URL for your application logger

Requirements

  • GitHub repository with Personal Access Token (repo scope)
  • OpenAI API account with GPT-4o access
  • Slack workspace with OAuth2 app installed
  • Two Slack channels: one for critical incidents, one for general dev alerts

How to customize

Adjust the duplicate detection score threshold (default 60) in the Code node. Modify the GPT-4o prompt to focus on specific error categories. The Wait node duration (30 minutes) can be tuned to match your alerting policy.


Key features

  • Scoring-based duplicate detection (no extra API calls required)
  • GPT-4o structured JSON output with graceful fallback parser
  • Severity-based Slack routing (#incident vs #dev-alerts)
  • Dynamic GitHub labels: bug, auto-generated, environment, and critical
  • n8n Variables used for GitHub owner and repo - no hardcoded values

Node List

# Node Name Type Purpose
1 Webhook for Error Logs Webhook Accepts error log payload via HTTP POST
2 Parse and Enrich Log Code Normalizes level, extracts error type, builds duplicate search keyword
3 Search GitHub Issues GitHub Fetches open issues labeled bug,auto-generated from the target repo
4 Score GitHub Issue Duplicates Code Scores each issue for similarity; flags duplicates at threshold ≥ 60
5 Check for Duplicates If Routes to skip path (true) or analysis path (false)
6 Notify Duplicate to Slack Slack Posts link to existing issue when duplicate detected
7 Respond with Duplicate Status Respond to Webhook Returns 200 OK JSON acknowledgment for duplicate path
8 OpenAI Error Analysis OpenAI GPT-4o analyzes root cause and returns structured JSON fix suggestions
9 Build GitHub Issue Body Code Parses AI JSON and builds Markdown issue body with tables and code blocks
10 Create GitHub Issue GitHub Creates GitHub issue with title, body, and dynamic labels
11 If Critical Error If Checks isCritical flag to route Slack notification channel
12 Post Critical Alert to Slack Slack Posts @here alert to #incident with full error details
13 Post Error Summary to Slack Slack Posts summary to #dev-alerts with GitHub issue link
14 Wait 30 Minutes Wait Enforces 30-minute cooldown to prevent notification flooding

Total: 14 nodes (+ 6 Sticky Notes)


Sticky Note Compliance

# Sticky Note Title Color Role
1 Main Sticky Note (Overview) Yellow Workflow overview, How it works, Setup steps, Customization
2 Receive and parse log White Covers webhook reception and log parsing
3 Check for duplicate GitHub issues White Covers GitHub search and duplicate scoring
4 Handle duplicates and notify White Covers duplicate branch (notification + webhook response)
5 Analyze error and suggest fixes White Covers AI analysis and issue creation
6 Send alerts and summarize White Covers severity check, Slack notifications, and wait

All sticky notes use H2 headings (## ) and follow n8n public guidelines.


Webhook payload schema

{
 "service": "payment-api",
 "level": "CRITICAL",
 "message": "NullPointerException at PaymentProcessor.java:142",
 "stack_trace": "java.lang.NullPointerException...",
 "environment": "production",
 "timestamp": "2025-01-15T09:23:45Z",
 "trace_id": "abc-123-xyz",
 "endpoint": "/api/v2/payments",
 "http_method": "POST",
 "status_code": 500,
 "user_id": "user_98765"
}

Required fields: service, level, message Optional fields: All others - missing values are handled gracefully with fallbacks.


How duplicate detection works

Match condition Points
Service name found in issue title +40
Error type found in issue title +40
Keyword overlap (words > 4 chars) +5 per word (max +20)

Threshold: Score ≥ 60 → duplicate detected → skip issue creation, notify Slack.


Tags

ai gpt-4 openai github slack error-monitoring devops automation

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Sticky Note5

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

Block 7 - Webhook for Error Logs

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

Block 8 - Parse and Enrich Log

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

Block 9 - Search GitHub Issues

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

Block 10 - Score GitHub Issue Duplicates

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

Block 11 - Check for Duplicates

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

Block 12 - OpenAI Error Analysis

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

Block 13 - Build GitHub Issue Body

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

Block 14 - Create GitHub Issue

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

Block 15 - If Critical Error

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

Block 16 - Post Critical Alert to Slack

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

Block 17 - Post Error Summary to Slack

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

Block 18 - Notify Duplicate to Slack

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

Block 19 - Wait 30 Minutes

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 20 - Respond with Duplicate Status

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

3. Summary Table

Workflow Analyze error logs with GPT-4o and create GitHub issues plus Slack alerts
Complexity advanced
Nodes 20
Categories DevOps, AI Summarization
Author TakatoYamada
Published 26 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15305/15305.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 Analyze error logs with GPT-4o and create GitHub issues plus Slack alerts do?

Analyze error logs with AI and auto create GitHub issues with fix suggestions Who is this for DevOps engineers, SREs, and development teams who want to automate error monitoring and reduce mean tim...

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.