Weekly Automation Analytics Report Generator and Emailer - n8n Workflow

Generate comprehensive weekly execution analytics reports for your n8n workflows. This n8n workflow template tracks errors, successes, and runtimes, delivering the report via Gmail or Outlook.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

n8n Administrators or Technical Leads managing self-hosted n8n instances.
Users who need regular, comprehensive performance metrics for their n8n workflow deployments.


  • DevOps teams requiring automated monitoring reports for their automation infrastructure.

Overview

Managing an environment full of active automation requires diligent monitoring. This specialized n8n workflow solves the tedious task of manually tracking execution health. It automatically queries the n8n API to retrieve details about all running n8n workflows and their execution history. By filtering this data to the last seven days, the n8n node aggregates statistics—including error counts, success rates, and average runtimes—and compiles them into a clean, styled HTML report. This ensures you always have up-to-date performance insights delivered directly to your inbox, making performance reviews and debugging much simpler. Use this as a powerful n8n templates solution for operational transparency.

How it Works

This automated process begins with the Schedule Trigger n8n node, set to run weekly.


  1. Data Collection (n8n API): The n8n workflow simultaneously uses two separate n8n node configurations to access the internal n8n API: one to Get all Workflows metadata and another to Get all previous executions logs.

  2. Data Structuring: The Edit Field ID to workflowId n8n node ensures that workflow identification keys are standardized by renaming the workflow id to workflowId, which is necessary for joining the datasets.

  3. Data Merging: The Merge n8n node combines the execution history with the descriptive workflow data based on the standardized workflowId field.

  4. Time Filtering: The Filter executions last week n8n node precisely isolates execution data from only the last 7 days using advanced date-time comparison expressions.

  5. Report Generation: The Prepare html report Code n8n node executes custom JavaScript logic to group executions by workflow, calculate performance metrics (total counts, total runtime, average runtime per status: error, success, waiting), and dynamically generate a complete, styled HTML report body and email subject line.

  6. Delivery: Finally, the generated HTML report and subject line are passed to parallel email n8n node configurations (Send a message outlook and Send a message gmail) for reliable delivery to stakeholders.

Installation Guide


  1. Import n8n Workflow: Copy the provided JSON code and import it directly into your n8n instance via the Workflows section to create this powerful n8n workflow.

  2. n8n Credentials Setup: The n8n nodes responsible for fetching execution logs require valid n8n API credentials configured within your instance that have access permissions for execution and workflow data.

  3. Email Credentials: Configure separate credentials for the desired email delivery services:

Gmail: Set up an OAuth 2.0 credential for the Send a message gmail n8n node.
Microsoft Outlook: Configure an OAuth 2.0 credential for the Send a message outlook n8n node.

  1. Customization: Edit the Schedule Trigger n8n node parameters if a frequency other than weekly is required. Ensure you customize the recipient email addresses in the final email nodes before activating the n8n workflow.

Node Details

Schedule Trigger: Function: This n8n trigger node initiates the execution every seven days, ensuring the weekly reporting cycle is automated. Key Configuration: Set to an interval of 7 days.
n8n Node (Get all Workflows / Get all previous executions): Function: These two n8n nodes interact with the local n8n API. They are configured to fetch all workflow metadata and all historical execution logs (Resource: execution, Return All: true). This is fundamental for the n8n workflow's analysis.
Edit Field ID to workflowId (Set Node): Function: Standardizes the naming convention by mapping the original id field retrieved from workflow data to workflowId, ensuring the subsequent Merge n8n node functions correctly.
Merge Node: Function: Combines the workflow metadata stream and the execution log stream, enriching the execution data with workflow names using the common workflowId field.
Filter executions last week (Filter Node): Function: This n8n node precisely filters the combined data using a date-time expression (startedAt after DateTime.now().minus({ days: 7 })) to capture only recent performance data for the report.
Prepare html report (Code Node): Function: This core n8n node calculates performance metrics (total counts, average runtimes per status) and programmatically generates the complete, styled HTML body and email subject line.


  • Send a message gmail / Send a message outlook (Gmail / Outlook Node): Function: These final n8n nodes handle the delivery of the HTML report. They use dynamic data expressions to populate the email content generated by the preceding n8n node.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Cybersecurity and automation consultant specializing in n8n workflows for GDPR compliance, process optimization, and business integration. Helping teams streamline operations with secure, scalable automation solutions.

Featured*