Skip to main content
Lifetime license included with every purchase
n8n workflowsdata reportinganalytics automationscheduled reports

How to Automate Data Reporting and Analytics with n8n

Build n8n workflows that pull metrics from every source, aggregate them on a schedule, and deliver formatted reports to Slack, email, or Google Sheets automatically.

Nn8n Marketplace Team·May 8, 2026·11 min read

Stop Pulling Numbers by Hand

Reporting on business metrics shouldn't require opening six tabs, copying numbers into a spreadsheet, and formatting a slide deck. Most teams do it anyway because no one has built the pipeline yet.

n8n can pull data from every tool your business uses — Google Analytics, Stripe, a Postgres database, your CRM, an ad platform — aggregate it on a schedule, and deliver a formatted report to Slack, email, or a live Google Sheet before anyone on your team starts their morning.

Once the workflow is live, the numbers come to you.

What You Can Automate

  • Scheduled metric reports — weekly revenue, signups, churn, and engagement pulled from every source and delivered to Slack or email on Friday afternoon
  • Multi-source dashboards — combine Stripe revenue, Google Analytics sessions, and HubSpot pipeline data into a single daily snapshot
  • KPI threshold alerts — detect when conversion rate drops below 2%, churn spikes above 5%, or ad spend exceeds budget, and fire a Slack alert immediately
  • Monthly executive summaries — pull month-over-month comparisons, format as an HTML email, and send to leadership on the first of each month
  • Data export and archiving — push processed metric snapshots to Google Sheets or Postgres for trend analysis and audit trails
  • Competitor price tracking — scrape competitor pages on a schedule, compare to your own rates, and alert on changes
  • API health monitoring — query your own endpoints hourly, track response times, and alert on degradation

The Reporting Pipeline

A complete n8n analytics system runs three coordinated tracks:

Track 1 — Daily Snapshot:
Schedule Trigger (daily 8am) → HTTP Request (Google Analytics) + Stripe node
  → Merge → Code (aggregate + format) → Slack (post to #metrics)
  → Google Sheets (append row to history)

Track 2 — Threshold Alerts:
Schedule Trigger (hourly) → HTTP Request (pull current KPI)
  → Code (compute delta vs. baseline) → IF (threshold exceeded?)
    → Yes: Slack (alert with metric + change %) + Sheets (log alert)
    → No: No-op

Track 3 — Weekly Digest:
Schedule Trigger (Friday 4pm) → Google Sheets (read 7-day history)
  → Code (compute week-over-week comparisons) → Gmail (HTML digest to team)

All three tracks write to the same Google Sheet — one source of truth for your metric history.

1. Collect — Pull From Every Source

Use a Schedule Trigger as the entry point. For a daily snapshot, set it to fire at 8am.

Connect parallel data-fetch nodes — one per data source. For Google Analytics use an HTTP Request node calling the GA4 Data API. For Stripe use the native Stripe node. For a Postgres database use the Postgres node with a SELECT query.

A sample GA4 API call to fetch yesterday's sessions:

// HTTP Request node — GA4 runReport endpoint
// Method: POST
// URL: https://analyticsdata.googleapis.com/v1beta/properties/{{YOUR_PROPERTY_ID}}/runReport
// Body:
{
  "dateRanges": [{ "startDate": "yesterday", "endDate": "yesterday" }],
  "metrics": [
    { "name": "sessions" },
    { "name": "activeUsers" },
    { "name": "conversions" }
  ]
}

Each fetch node runs independently. A Merge node combines all outputs into a single item array before processing.

One workflow, many sources

The Merge node in n8n can combine up to 10 parallel input branches. Pull revenue from Stripe, sessions from GA4, and signups from your database simultaneously — the workflow waits for all three before moving on.

2. Process — Normalize and Compute

A Code node receives the merged array and normalizes each source into a consistent shape. This is also where you compute derived metrics — conversion rate, revenue per user, week-over-week change.

const ga = items.find(i => i.json.source === 'ga4')?.json || {};
const stripe = items.find(i => i.json.source === 'stripe')?.json || {};
const db = items.find(i => i.json.source === 'postgres')?.json || {};

const sessions = parseInt(ga.sessions || 0);
const conversions = parseInt(ga.conversions || 0);
const revenue = parseFloat(stripe.total_revenue || 0);
const newSignups = parseInt(db.signups_today || 0);

return [{
  json: {
    date: new Date().toISOString().split('T')[0],
    sessions,
    conversions,
    conversion_rate: sessions > 0
      ? ((conversions / sessions) * 100).toFixed(2) + '%'
      : '0%',
    revenue,
    new_signups: newSignups,
    revenue_per_signup: newSignups > 0
      ? (revenue / newSignups).toFixed(2)
      : '0',
  }
}];

You now have a single clean object representing today's performance across all sources.

3. Route — Threshold Detection

An IF node checks each key metric against its acceptable range. You can hardcode thresholds directly in the node or read them from a config row in Google Sheets (which makes them easy to update without touching the workflow).

IF: conversion_rate < 1.5%  → alert branch
IF: revenue < daily_target  → alert branch
IF: new_signups < 10        → alert branch
All pass                     → snapshot branch

The alert branch fires a Slack message and logs the alert with a timestamp. The snapshot branch continues to the distribution step.

Read thresholds from a config sheet

Store your alert thresholds in a dedicated Google Sheets tab: one row per metric with metric_name, warning_threshold, and critical_threshold columns. A Google Sheets node at the start of the workflow reads these values, and the IF node compares against them dynamically. Change a threshold by editing the sheet — no workflow edit required.

4. Act — Distribute the Report

Route the processed snapshot to all output channels in parallel:

Slack node posts a formatted daily digest to your #metrics channel:

📊 Daily Metrics — 2026-05-08
Sessions: 4,821  |  Conversions: 97  |  Rate: 2.01%
Revenue: $3,412  |  New signups: 34  |  Rev/signup: $100.35

Google Sheets node appends the normalized row to your history sheet — one row per day builds a trend data set over time.

Gmail node (for weekly digests) sends an HTML email with a table of the week's metrics, formatted using a Code node that builds the HTML string.

Get the App Analytics Dashboard template

5. Follow Up — Archive and Trend

A second Google Sheets read at the end of the weekly digest workflow pulls the last 30 days of history rows. A Code node computes rolling averages, identifies the best and worst day, and flags any week-over-week regressions.

This follow-up section turns a raw log into actionable context:

const rows = items.map(i => i.json).sort((a, b) =>
  new Date(a.date) - new Date(b.date)
);
const last7 = rows.slice(-7);
const prev7 = rows.slice(-14, -7);

const avgRevenue = arr => arr.reduce((s, r) => s + r.revenue, 0) / arr.length;
const revenueChange = ((avgRevenue(last7) - avgRevenue(prev7)) / avgRevenue(prev7) * 100).toFixed(1);

return [{ json: {
  revenue_wow_change: revenueChange + '%',
  best_day: last7.reduce((best, r) => r.revenue > best.revenue ? r : best, last7[0]),
  report_period: `${last7[0].date} to ${last7[last7.length - 1].date}`,
}}];

The digest now includes context, not just numbers — your team can see whether this week was better or worse, and by how much.

Implementation Patterns

Pattern 1: Daily Slack Snapshot

The simplest pattern. Fire once per morning, pull key numbers, post to Slack:

Schedule Trigger (daily 8am)
  → Stripe node (yesterday's revenue)
  → Google Analytics (yesterday's sessions + conversions)
  → Merge
  → Code (normalize + compute conversion rate)
  → IF (any metric below threshold?)
    → Yes: Slack (alert) + Sheets (log alert)
    → No: Slack (normal snapshot)
  → Google Sheets (append to history)

Build this first. Once the history sheet has data, the weekly digest patterns become trivial.

Pattern 2: Multi-Source KPI Dashboard

For teams that track metrics across many platforms, a dedicated dashboard workflow runs hourly and writes to a live Google Sheet that serves as the source of truth for a Looker Studio or Sheets-based dashboard:

Schedule Trigger (hourly)
  → HTTP Request (GA4 realtime users)
  → HTTP Request (Stripe MRR via billing API)
  → HTTP Request (HubSpot open deals count)
  → HTTP Request (your database — active users today)
  → Merge (all four branches)
  → Code (normalize, compute ratios)
  → Google Sheets (update single "live" row — overwrite, not append)

The sheet always shows the current state. Connect Looker Studio to this sheet for a zero-maintenance live dashboard.

Get the Decision Makers Dashboard template

Pattern 3: Anomaly Detection and Alert

For high-stakes metrics like conversion rate or API error rate, run an anomaly detection workflow that compares the current value against a rolling baseline:

Schedule Trigger (every 15 min)
  → HTTP Request (current metric value)
  → Google Sheets (read last 30 data points)
  → Code (compute rolling mean + 2 standard deviations)
  → IF (current value outside mean ± 2 SD?)
    → Yes: Slack (anomaly alert with current value, baseline, and % deviation)
         + Sheets (log alert with severity score)
    → No: Sheets (append normal reading)

The Code node for anomaly detection:

const history = items.slice(0, -1).map(i => parseFloat(i.json.value));
const current = parseFloat(items[items.length - 1].json.value);

const mean = history.reduce((s, v) => s + v, 0) / history.length;
const variance = history.reduce((s, v) => s + Math.pow(v - mean, 2), 0) / history.length;
const stdDev = Math.sqrt(variance);

const zScore = Math.abs((current - mean) / stdDev);
const isAnomaly = zScore > 2;

return [{ json: { current, mean: mean.toFixed(2), std_dev: stdDev.toFixed(2), z_score: zScore.toFixed(2), is_anomaly: isAnomaly } }];

This approach catches real deviations without firing false alerts on normal variance.

Track market signals alongside your own metrics

Use the Market Trend Analyzer template to pull competitor and industry signals into the same reporting pipeline. Correlate your conversion rate drops with competitor price changes or industry news — context that a single-source report never shows.

n8n Nodes You'll Use Most

NodePurpose
Schedule TriggerFire reporting workflows on a daily, weekly, or hourly cadence
HTTP RequestCall GA4 Data API, ad platform APIs, and any REST metric endpoint
StripePull revenue, MRR, subscription counts, and refunds natively
Postgres / MySQLQuery your own database for product usage and signups
Google SheetsRead config thresholds, append history rows, write live dashboard data
MergeCombine parallel data-fetch branches before aggregation
CodeNormalize multi-source data, compute derived metrics, detect anomalies
IF / SwitchRoute by threshold breach, severity level, or metric category
SlackPost formatted snapshots, KPI alerts, and digest summaries
Gmail / SendGridSend HTML metric digest emails to leadership or stakeholders
Loop Over ItemsProcess each metric row independently when building batch reports

Getting Started

Start with the daily Slack snapshot — it is the fastest workflow to build and gives you an immediately useful output on day one.

  1. Identify your top 3–5 metrics — pick numbers your team actually checks today: revenue, sessions, signups, or active users. Start narrow.
  2. Set up one data source — connect n8n to the most important source first (Stripe native node for revenue, or HTTP Request for GA4). Get one clean data pull working before adding more.
  3. Build the Merge + Code layer — add a Code node that normalizes the output and computes one derived metric (like conversion rate). Confirm the output shape is exactly what you want to post.
  4. Connect the Slack output — add a Slack node and test the full flow manually. Confirm the message looks right in your channel.
  5. Add the Google Sheets history append — one extra node that writes the processed row to a dated sheet. This unlocks trend analysis within a week.
  6. Add a second data source — once the first source is solid, add the second fetch branch and merge it in. Adding sources later is easy once the Merge + Code pattern is established.
  7. Enable the Schedule Trigger and let it run — switch from manual test to scheduled execution. After one week you have a trend data set you can query.

For more on building AI-assisted analytics pipelines that classify, summarize, and route data automatically, see the n8n AI-powered automation guide. For automating the financial reporting side — invoices, payment status, and AR health — see the n8n invoice and payment automation guide.

Browse analytics and reporting templates
FAQ

Common questions

Can n8n pull data from multiple sources into one report?
Yes. n8n can query Google Analytics, Stripe, Postgres, Google Sheets, HubSpot, and any REST API in the same workflow. A Merge node combines the results into a single data set, and a Code node formats it into the report structure you need — CSV, JSON, HTML email, or Slack message.
How do I set up a weekly metrics email with n8n?
Use a Schedule Trigger set to Friday at 4pm. Connect HTTP Request or native integration nodes to pull your key metrics. A Code node aggregates and formats the numbers. A Gmail or SendGrid node sends the formatted HTML report to your team. The whole workflow runs in under 30 seconds and needs no manual input.
Can n8n alert me when a metric crosses a threshold?
Yes. A daily or hourly Schedule Trigger pulls the metric, and an IF node checks whether it falls outside your acceptable range. If it does, the workflow routes to a Slack message, an email, or a PagerDuty alert. You define the thresholds directly in the IF node conditions or in a config row in Google Sheets.
Stop reading. Start running.

Get the workflow templates this guide is built on

Import-ready n8n JSON, step-by-step setup, and tested end-to-end. One-time payment, own it forever.