10 · Advanced
At 9:00 each morning, writes demo KPIs to Sheets and posts the same digest to Slack.
Schedule
Code
Sheets
Slack
n8n canvas preview
Daily Digest
Canvas via n8n-demo · import JSON into n8n.io → Workflows → Import from File
Writeup
Scheduled 9:00am cron builds demo KPIs in Code, then appends Sheets and posts a Slack #ops digest in parallel. (Timezone label lives in the Code output, not the Schedule node.)
Step by step — how to build it
01
Add Schedule Trigger
Custom cron (or Cron) → expression 0 9 * * * (09:00 daily in the instance timezone).
02
Add Code (Aggregate)
Connect Schedule → Code. Return demo data: return [{ json: { leads: 12, claims: 9, failed: 1, timezone: 'Asia/Manila' } }];
03
Branch to Google Sheets
From Code → Google Sheets Append (autoMap). Pick Document + Sheet + credential.
04
Branch to Slack (parallel)
Also from Code → Slack → channel ops → text :bar_chart: Daily inbound digest ready.
05
Set instance timezone
n8n Settings → timezone so 0 9 * * * matches your morning (Asia/Manila in Code is only a data label).
06
Dry-run then Activate
Execute once → Sheet row + #ops message. Then Active for the daily schedule.
How it functions
1 · Cron 09:00
Schedule Trigger cronExpression 0 9 * * * (09:00 in the n8n instance timezone).
2 · Aggregate (Code)
Returns [{ leads: 12, claims: 9, failed: 1, timezone: 'Asia/Manila' }] — demo numbers, replace with real queries.
3 · Log Sheet + Slack Digest (parallel)
Aggregate fans out to Sheets append (autoMap) and Slack #ops (“:bar_chart: Daily inbound digest ready”).
Setup notes
Import + credentials
Sheets + Slack. Confirm #ops and a digest spreadsheet.
Set instance timezone
n8n Settings timezone (or host TZ) controls when 0 9 * * * fires — not the Code field.
Replace Code
Swap Aggregate for real reads (Sheets/HTTP). Keep Slack text short; put numbers in Sheets.
Activate + manual run
Execute once to verify both branches, then leave Active.
Tips
Asia/Manila in this JSON is a data field, not Schedule config — easy to misread.
Parallel Sheet + Slack means one failure doesn’t block the other branch’s start.
Import into n8n.io → Workflows → Import from File, attach credentials, activate.