Skip to main content

Aggregate error alerts and send consolidated reports via Email and Jira

Workflow preview

Workflow preview
100%
Aggregate error alerts and send consolidated reports via Email and Jira preview
Open on n8n.io

1. Workflow Overview

Error Alert Aggregator – Email and Jira This workflow aggregates error logs arriving from multiple sources, deduplicates identical events within a configurable time window, and sends a single conso...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.emailsend, n8n-nodes-base.wait, n8n-nodes-base.jira

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by vinci-king-01.

Original n8n.io source

1.1 Workflow description

Title
Aggregate error alerts and send consolidated reports via Email and Jira
Workflow name
Aggregate error alerts and send consolidated reports via Email and Jira

Error Alert Aggregator – Email and Jira

This workflow aggregates error logs arriving from multiple sources, deduplicates identical events within a configurable time-window, and sends a single consolidated notification via Email and Jira. It prevents alert fatigue by batching similar errors and guarantees that responsible teams are informed through both channels.

Pre-conditions/Requirements

Prerequisites

  • n8n instance (self-hosted ≥ v1.0 or n8n.cloud account)
  • Basic understanding of your log source’s payload structure
  • SMTP server or n8n Email credentials configured
  • Jira Cloud or Jira Server account with API access

Required Credentials

  • Email (SMTP/IMAP or n8n Email node credential) — to dispatch alert emails
  • Jira — Create issues automatically in the chosen project
  • HTTP Request Auth (optional) — If your log endpoint requires authentication

Specific Setup Requirements

Setting Recommended Value Notes
Batch window (Wait node) 10 minutes Time allowed to collect & deduplicate errors
Deduplication key (Code) error_id or message field Choose a unique attribute representing the same incident
Email recipients Security & DevOps distribution list Use semicolons for multiple addresses
Jira project key SEC Project where alert tickets should be filed

How it works

This workflow aggregates error logs arriving from multiple sources, deduplicates identical events within a configurable time-window, and sends a single consolidated notification via Email and Jira. It prevents alert fatigue by batching similar errors and guarantees that responsible teams are informed through both channels.

Key Steps:

  • Schedule Trigger: Runs every X minutes to poll/collect new log items.
  • HTTP Request: Pulls error events from your monitoring or log system.
  • IF Node: Quickly filters out non-error or resolved events.
  • Code Node (Deduplicator): Hashes & stores unique error signatures, skipping already-seen items.
  • Wait Node: Holds processing for the batching period (e.g., 10 min).
  • Merge Node: Combines all unique errors gathered during the window.
  • Set Node: Formats the consolidated message for Email & Jira.
  • Email Send: Dispatches the summary email.
  • Jira Node: Creates (or updates) an issue with the same summary.
  • Sticky Notes: Provide inline documentation right inside the workflow for easier maintenance.

Set up steps

Setup Time: 15-20 minutes

  1. Import template: Download the JSON template and drag & drop it into your n8n editor.
  2. Configure Schedule Trigger: Set polling interval (e.g., every 5 minutes).
  3. HTTP Request Node:
  • Enter the URL of your log endpoint.
  • Add authentication if required.
  1. Adjust IF filter: Modify the condition to match your log’s error severity field (status === "error").
  2. Customize Code Node:
  • Replace error_id with the field that uniquely identifies an error.
  • Optionally tweak deduplication TTL.
  1. Wait Node: Set the batch time (e.g., 600 seconds).
  2. Set Node: Edit the email subject/body and Jira issue summary/description placeholders.
  3. Credentials:
  • Add or select your Email credential in Email Send.
  • Add or select your Jira credential in Jira node.
  1. Test run the workflow to verify that:
  • Duplicate events are collapsed.
  • Email and Jira tickets show combined information.
  1. Activate the workflow to start production monitoring.

Node Descriptions

Core Workflow Nodes:

  • Schedule Trigger – Initiates workflow on a fixed interval.
  • HTTP Request – Retrieves fresh error logs from an external API.
  • IF – Only lets true error events proceed.
  • Code (Deduplicator) – Uses JavaScript to remove already-known errors via n8n static data.
  • Wait – Creates a batching window for aggregation.
  • Merge (Queue mode) – Joins events accumulated during the wait.
  • Set – Crafts a human-readable report for Email & Jira.
  • Email Send – Dispatches the consolidated message to stakeholders.
  • Jira – Opens/updates an issue containing the same error digest.
  • Sticky Note – Provides inline explanations for future maintainers.

Data Flow:

  1. Schedule TriggerHTTP RequestIFCode
  2. CodeWaitMergeSet
  3. SetEmail Send & Jira

Customization Examples

Change Deduplication Strategy

// Code Node snippet
// Use error 'stacktrace' + 'service' for uniqueness
const signature = `${item.json.stacktrace}_${item.json.service}`;
if ($workflow.staticData.signatureCache?.includes(signature)) {
 // duplicate, skip
 return [];
}
$workflow.staticData.signatureCache = [
 ...( $workflow.staticData.signatureCache || [] ),
 signature
];
return item;

Update Existing Jira Issue Instead of Creating New

// Jira Node settings
// Search for an open ticket with the same summary
// If found, add a comment instead of creating
{
 "operation": "comment",
 "issueKey": "={{$node['Set'].json['jiraIssueKey']}}",
 "comment": "New occurrences: {{$json.errorCount}}"
}

Data Output Format

The workflow outputs structured JSON data:

{
 "errors": [
 {
 "id": "ERR123",
 "message": "Database timeout",
 "count": 5,
 "firstSeen": "2024-03-14T10:12:00Z",
 "lastSeen": "2024-03-14T10:22:00Z"
 }
 ],
 "emailStatus": "success",
 "jiraStatus": "issue_created"
}

Troubleshooting

Common Issues

  1. No data returned from HTTP Request – Verify endpoint URL, authentication headers, and that your monitoring tool actually has recent error events.
  2. Duplicate alerts still coming through – Increase the Wait node’s batching window or refine the deduplication key in the Code node.

Performance Tips

  • Cache HTTP responses if the log API supports it to reduce bandwidth.
  • Use selective fields in the HTTP Request’s query parameters to limit payload size.

Pro Tips:

  • Store a rolling hash list in external Redis or DB for large-scale deduplication.
  • Add a second IF branch to auto-resolve Jira tickets when an error disappears for X hours.
  • Use Slack or Microsoft Teams nodes in parallel to broaden alert coverage.

This is a community-contributed n8n workflow template provided “as-is.” Thoroughly test in a non-production environment before deploying to production.

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 - Hourly Trigger

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

Block 2 - Fetch Raw Logs

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

Block 3 - Has Logs?

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

Block 4 - Parse & Flatten Logs

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

Block 5 - Batch Logs

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

Block 6 - Deduplicate Batch

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

Block 7 - Any New Errors?

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

Block 8 - Assess Severity

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

Block 9 - Critical Errors?

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

Block 10 - Critical Alert Email

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

Block 11 - Prepare Jira Issue

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

Block 12 - Rate Limit Wait

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

Block 13 - Create Jira Issue

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

Block 14 - Collect Issue Keys

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

Block 15 - Generate Summary

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

Block 16 - Format Summary Email

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

Block 17 - Daily Summary Email

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

Block 18 - Overview

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

Block 19 - Section – Fetch

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

Block 20 - Section – Process

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

Block 21 - Section – Notify & Store

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

3. Summary Table

Workflow Aggregate error alerts and send consolidated reports via Email and Jira
Complexity advanced
Nodes 21
Categories DevOps
Author vinci-king-01
Published 25 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12989/12989.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 Aggregate error alerts and send consolidated reports via Email and Jira do?

Error Alert Aggregator – Email and Jira This workflow aggregates error logs arriving from multiple sources, deduplicates identical events within a configurable time window, and sends a single conso...

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 use case.