Google Sheets Reporting
Automated reporting and alerting from any Google Sheets data. Get daily summaries, threshold-based alerts, and weekly digest emails without building dashboards.
Problem
Teams store operational data in Google Sheets but lack automated reporting. Checking sheets manually is tedious, and important changes (threshold violations, trends) go unnoticed until it's too late.
This skill turns any Google Sheet into an automated reporting system with zero code changes.
What It Does
- 1. Daily Summary — Auto-detects numeric columns, calculates sum/avg/min/max, emails formatted report
- Threshold Alerts — Checks values against configurable min/max thresholds hourly, sends alert emails when violated
- Weekly Digest — Multi-sheet summary every Monday with period-over-period comparison
Included Workflows
| # | File | Purpose |
|---|
| 01 | INLINECODE0 | Daily aggregate statistics email for any sheet |
| 02 |
02-threshold-alerts.json | Hourly threshold monitoring with alert emails |
| 03 |
03-weekly-digest.json | Weekly multi-sheet digest email (Monday 9AM) |
Architecture
CODEBLOCK0
Required n8n Credentials
| Credential Type | Used For | Placeholder in JSON |
|---|
| Google Sheets OAuth2 | Reading sheet data | INLINECODE3 |
| SMTP |
Sending reports and alerts |
YOUR_SMTP_CREDENTIAL_ID |
Configuration Placeholders
| Placeholder | Description |
|---|
| INLINECODE5 | Google Sheet ID to monitor |
| INLINECODE6 |
n8n Google Sheets credential ID |
|
YOUR_SMTP_CREDENTIAL_ID | n8n SMTP credential ID |
|
YOUR_NOTIFICATION_EMAIL | Email for reports and alerts |
Environment Variables
CODEBLOCK1
Threshold Configuration
Thresholds are configured via the ALERT_THRESHOLDS environment variable as JSON:
CODEBLOCK2
- -
min — Alert if value falls below this (set null to disable) - INLINECODE12 — Alert if value exceeds this (set
null to disable) - INLINECODE14 — Human-readable name for alert emails
Quick Start
1. Prerequisites
- - n8n v2.4+ (self-hosted)
- Google Sheets OAuth2 credentials
- SMTP email credentials
- A Google Sheet with data (any structure works)
2. Import & Configure
Import all 3 JSON files into n8n. Replace
YOUR_REPORT_SHEET_ID with your sheet's ID and set credential placeholders.
3. Customize Sheet Names
Edit the Google Sheets nodes to match your tab names (default: "Data" and "Sheet2").
4. Set Thresholds
Configure
ALERT_THRESHOLDS env var for your columns, or edit the Code node defaults directly.
5. Activate
Activate all 3 workflows. You'll receive your first daily summary within 24 hours.
Use Cases
- 1. Sales teams — Daily revenue summaries and low-sales alerts from order sheets
- Support teams — Ticket count monitoring with escalation alerts
- Marketing — Campaign performance digests from tracking sheets
- Operations — Inventory level alerts and daily status reports
- Finance — Expense monitoring with budget threshold alerts
Requirements
- - n8n v2.4+ (self-hosted or cloud)
- Google Sheets OAuth2 credentials
- SMTP email credentials
Google Sheets 报告系统
基于 Google Sheets 数据的自动化报告与告警系统。无需构建仪表板,即可获取每日摘要、阈值告警和每周摘要邮件。
问题
团队将运营数据存储在 Google Sheets 中,但缺乏自动化报告功能。手动检查表格繁琐耗时,重要变更(阈值违规、趋势变化)往往在发现时为时已晚。
本技能可将任意 Google Sheet 转化为自动化报告系统,无需修改任何代码。
功能说明
- 1. 每日摘要 — 自动检测数值列,计算总和/平均值/最小值/最大值,发送格式化报告邮件
- 阈值告警 — 每小时检查数值是否超出可配置的最小/最大阈值,违规时发送告警邮件
- 每周摘要 — 每周一发送多表格摘要,包含周期对比分析
包含的工作流
| 序号 | 文件 | 用途 |
|---|
| 01 | 01-daily-summary.json | 任意表格的每日聚合统计邮件 |
| 02 |
02-threshold-alerts.json | 每小时阈值监控及告警邮件 |
| 03 | 03-weekly-digest.json | 每周多表格摘要邮件(周一上午9点) |
架构
每日(一次):
|
v
工作流 01:每日摘要
+-> 读取表格数据
+-> 自动检测数值列
+-> 计算总和、平均值、最小值、最大值
+-> 统计首个文本列中的类别数量
+-> 发送格式化报告邮件
每小时:
|
v
工作流 02:阈值告警
+-> 读取表格数据
+-> 检查每个数值是否超出阈值
+-> 若发现违规 -> 发送告警邮件
+-> 阈值可通过环境变量配置
每周(周一上午9点):
|
v
工作流 03:每周摘要
+-> 并行读取主表格和副表格
+-> 汇总两个表格
+-> 发送合并摘要邮件
所需的 n8n 凭据
| 凭据类型 | 用途 | JSON 中的占位符 |
|---|
| Google Sheets OAuth2 | 读取表格数据 | YOURGOOGLESHEETSCREDENTIALID |
| SMTP |
发送报告和告警 | YOUR
SMTPCREDENTIAL_ID |
配置占位符
| 占位符 | 说明 |
|---|
| YOURREPORTSHEETID | 要监控的 Google Sheet ID |
| YOURGOOGLESHEETSCREDENTIAL_ID |
n8n Google Sheets 凭据 ID |
| YOUR
SMTPCREDENTIAL_ID | n8n SMTP 凭据 ID |
| YOUR
NOTIFICATIONEMAIL | 接收报告和告警的邮箱 |
环境变量
bash
必需
REPORT_EMAIL=your-email@example.com
可选:阈值配置(JSON格式)
ALERT
THRESHOLDS={revenue:{min:100,max:null,label:收入},errorcount:{min:null,max:10,label:错误数}}
阈值配置
阈值通过 ALERT_THRESHOLDS 环境变量以 JSON 格式配置:
json
{
column_name: {
min: 100,
max: null,
label: 显示名称
}
}
- - min — 数值低于此值时触发告警(设为 null 禁用)
- max — 数值超过此值时触发告警(设为 null 禁用)
- label — 告警邮件中的人类可读名称
快速开始
1. 前置条件
- - n8n v2.4+(自托管)
- Google Sheets OAuth2 凭据
- SMTP 邮件凭据
- 包含数据的 Google Sheet(支持任意结构)
2. 导入与配置
将所有 3 个 JSON 文件导入 n8n。将 YOUR
REPORTSHEET_ID 替换为你的表格 ID,并设置凭据占位符。
3. 自定义工作表名称
编辑 Google Sheets 节点以匹配你的标签页名称(默认:Data 和 Sheet2)。
4. 设置阈值
为你的列配置 ALERT_THRESHOLDS 环境变量,或直接编辑 Code 节点的默认值。
5. 激活
激活所有 3 个工作流。你将在 24 小时内收到第一份每日摘要。
使用场景
- 1. 销售团队 — 从订单表格获取每日收入摘要和低销售额告警
- 支持团队 — 工单数量监控及升级告警
- 市场营销 — 从跟踪表格获取活动效果摘要
- 运营管理 — 库存水平告警和每日状态报告
- 财务部门 — 费用监控及预算阈值告警
系统要求
- - n8n v2.4+(自托管或云端)
- Google Sheets OAuth2 凭据
- SMTP 邮件凭据