Automate Weekly Workflow Failure Reports with n8n & Telegram

Discover how to automate weekly failure reports for your n8n workflows using the Telegram node. This workflow compiles failures from the past 7 days and sends timely alerts, saving you hours of manual monitoring.
scheduleTrigger
n8n
filter
+4
Learn how to Build this Workflow with AI:
Workflow Identifier: 1509
NODES in Use: scheduleTrigger, n8n, filter, set, aggregate, telegram, stickyNote

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Sarah, a Workflow Administrator managing multiple business-critical automations in n8n. Every week, she spends nearly 2 hours manually checking the execution history of each workflow to catch failures. Missing a failure could delay crucial operations, costing productivity and causing frustration. This repetitive monitoring is error-prone and inefficient—Sarah needs a reliable way to automate failure reporting without logging into n8n every day.

2. What This Automation Does

This specific n8n automation compiles all workflow failures from the past 7 days and sends a consolidated report via Telegram. When triggered weekly, it:

  • Retrieves all executions of a specified workflow from n8n’s internal execution history.
  • Filters failures that occurred within the last 7 days.
  • Creates a custom message for each failure, including workflow name, execution ID, and failure date.
  • Aggregates these messages into a single notification.
  • Sends the aggregated failure report to a specified Telegram chat via the Telegram node.

This automation saves Sarah over 2 hours per week in manual checks and ensures she never misses an important failure alert.

3. Prerequisites ⚙️

  • n8n Account (cloud or self-hosted) with API access enabled.
  • Telegram Bot Token and Chat ID to send messages.
  • Properly configured n8n credentials for accessing the execution API and Telegram.

4. Step-by-Step Guide

Step 1: Set Up the Schedule Trigger to Run Weekly

In n8n, add a Schedule Trigger node:

  • Click + Add Node → search for Schedule Trigger.
  • Set “Interval” to trigger every 7 days.
  • This ensures the workflow runs once a week automatically.
  • Common mistake: Forgetting to specify 7 days interval causes the workflow to run too often or never.

    Step 2: Retrieve All Execution Records

    Add the n8n Internal Execution node:

    • Click + Add Node → search for n8n node (type: execution resource).
    • Configure to retrieve all executions for a specific workflow ID.
    • Set it to return all results (not just the first page).
    • You can leave the workflow ID empty to monitor all workflows or specify a workflow ID for targeted checks.

      Common mistake: Forgetting to enable return all causes incomplete data retrieval.

      Step 3: Filter Failures Within the Last 7 Days

      Add a Filter node to process execution results:

      • Set conditions to:
        • Execution start date > current time minus 7 days.
        • Execution’s finished status is false (not successfully finished).
      • This filters only failures within the last week.
      • Common mistake: Misconfiguring date comparison logic or operator types.

        Step 4: Format Failure Messages

        Add a Set node:

        • Create a new string field “message” with the template: ⚠️ Workflow `{{ $json.workflowData.name }}` failed to run! [execution]({{ $json.id }}) [date]({{ $json.startedAt }})
        • This builds a unique alert message per failure with clickable links to the execution details and date.
        • Common mistake: Syntax errors or incorrect field references.

          Step 5: Aggregate Messages Into Single Notification

          Add an Aggregate node:

          • Choose to aggregate all “message” fields from input data.
          • This step consolidates all failure alerts into one message to avoid spamming.
          • Common mistake: Forgetting to aggregate leads to multiple separate messages.

            Step 6: Send the Report via Telegram

            Add the Telegram node:

            • Provide Telegram bot credentials and target chat ID.
            • Set the message text to the aggregated message from the previous step using expression: {{$json.message.join("n")}}.
            • This sends a clean, readable weekly failure report directly to your Telegram app.
            • Common mistake: Invalid chat ID or bot permissions cause sending issues.

              5. Customizations ✏️

              • Change Workflow Scope: In the “Get all previous executions” node, specify a different workflow ID to monitor other workflows.
              • Adjust Timeframe: Modify the date filter in “Filter for executions of the week” node to check failure windows other than 7 days.
              • Customize Telegram Message: Edit the message template in the “Set a message for each failed execution” node to include more info, e.g., error messages.
              • Add Multiple Notification Channels: Duplicate the Telegram node and add other notification nodes like Email or Slack for multi-channel alerts.

              6. Troubleshooting 🔧

              Problem: “No failures are appearing in the Telegram report despite recent errors.”
              Cause: Incorrect workflow ID or filtering conditions in “Get all previous executions” or “Filter” node.
              Solution: Double-check workflow ID is correct and the date condition captures last 7 days properly. Test by manually triggering workflow and inspecting execution data.

              Problem: “Telegram messages fail to send.”
              Cause: Invalid bot token, missing chat ID, or Telegram API restrictions.
              Solution: Verify Telegram credentials and that bot has permission to send messages to the chat. Use Telegram API test tools to confirm connectivity.

              7. Pre-Production Checklist ✅

              • Confirm Telegram bot token and chat ID are correctly configured.
              • Validate workflow ID input in “Get all previous executions” node matches your target workflows.
              • Test Schedule Trigger to ensure weekly runs activate correctly.
              • Run manual test execution and verify messages appear in Telegram.

              8. Deployment Guide

              Once tested, activate the workflow in n8n’s editor using the “Activate” toggle. The Schedule Trigger ensures weekly execution without manual intervention. For monitoring, enable webhook logs or use n8n’s execution logs to track failures. Adjust notification settings in Telegram as needed.

              9. FAQs

              Q: Can I use Slack instead of Telegram for notifications?
              A: Yes, by replacing the Telegram node with Slack nodes configured with your workspace credentials.

              Q: Does this workflow use a lot of n8n API calls?
              A: It fetches executions once per week, so API usage is minimal and well within typical usage limits.

              Q: Is the Telegram bot secure?
              A: Yes, your bot’s credentials and chat ID should be kept private, and Telegram uses encrypted communication.

              10. Conclusion

              By following this guide, you’ve automated weekly failure detection and reporting for your n8n workflows using the Telegram node. This saves precious time, catches failures promptly, and keeps you informed wherever you are. Next, consider expanding this by adding email alerts, integrating Slack, or automating resolution steps. Keep improving your automation monitoring to stay ahead!

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free