๐Ÿ”ฌ Generate a weekly business metrics report with Stripe, Notion, Sheets, Claude, SendGrid, and Slack

โšก 46 views ยท ๐Ÿ”ฌ Document Extraction & Analysis

Description

Stop compiling your weekly business report by hand. Let automation pull the numbers, and let Claude write the narrative.

Every Monday morning, this workflow fetches last weekโ€™s revenue from Stripe, pipeline data from Notion, and operational metrics from Google Sheets aggregates everything into a single structured dataset, hands it to Claude Sonnet 4 for executive analysis, and delivers a styled HTML report to your inbox before youโ€™ve had your first coffee.


How it works

The workflow runs in five sequential stages:

1. Trigger & Date Setup Fires every Monday at 08:00. Computes last weekโ€™s date window in your configured business timezone using Luxon, outputting ISO timestamps, Unix epochs, and milliseconds so every downstream node speaks the same time format without conversion.

2. Data Collection Fetches from three sources in sequence:

3. Aggregation Normalises all three sources into a single structured item: gross and net revenue, refunds, transaction count, total and probability-weighted pipeline value, deal count by stage, and all operational KPIs. Every field has a safe fallback so missing data never crashes the report.

4. AI Executive Narrative Passes the aggregated metrics to Claude Sonnet 4 with a structured prompt requesting three paragraphs: revenue performance, pipeline health, and operational highlights with a forward-looking observation. Temperature is set to 0 for consistent, professional tone on every run.

5. Report Build & Delivery Assembles a styled HTML email with KPI cards, a pipeline stage breakdown table, and the AI narrative embedded inline. Sends via SendGrid, then fires a Slack message to your chosen channel with a one-line summary of net revenue and new deal count.


Key benefits


Setup

  1. Credentials: Connect your Anthropic account to the Anthropic Chat Model node
  2. SendGrid: Connect your SendGrid credential to the Send via SendGrid and Send Error Email nodes
  3. Google Sheets: Connect a Google Sheets OAuth2 credential to the GSheets: Ops Metrics node
  4. Slack: Connect your Slack credential to the Slack: Report Sent node
  5. Stripe: Set STRIPE_SECRET_KEY environment variable
  6. Notion: Set NOTION_API_KEY and NOTION_DEALS_DB_ID environment variables
  7. Google Sheets: Set GSHEETS_SPREADSHEET_ID, GSHEETS_SHEET_NAME, and GSHEETS_LAST_ROW_RANGE environment variables
  8. Email: Set REPORT_EMAIL_FROM, REPORT_EMAIL_TO, and REPORT_ALERT_EMAIL environment variables
  9. Slack: Set SLACK_CHANNEL_ID environment variable
  10. Timezone: Set REPORT_TIMEZONE environment variable (e.g., Europe/Helsinki defaults to UTC if not set)

Who this is for


Required credentials


How to customize it

๐Ÿ”— Nodes Used

Google Sheets, Slack, SendGrid, Schedule Trigger, Basic LLM Chain, Anthropic Chat Model

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup