Quick Overview
This workflow runs daily to read recurrence rules from a Notion database, creates due task pages in a Notion tasks database, prevents duplicate spawns using an n8n Data Table ledger, and posts a summary of created tasks to a Slack channel.
How it works
- Runs every day at 06:00 on a schedule.
- Reads all pages from a Notion recurrence rules database.
- Evaluates each rule against today’s date (in a configured timezone) to select which tasks are due.
- Checks an n8n Data Table ledger to skip rules that already spawned today.
- Creates a new page in a Notion tasks database for each due rule and sets its Due date to today.
- Upserts the rule’s last-spawned date into the ledger and posts a one-line summary to a Slack channel.
Setup
- Add a Notion API credential and set your Notion Rules database ID and Notion Tasks database ID in the two Notion nodes.
- Ensure the rules database includes properties like rule_id, task_title, frequency, interval_days, anchor_date, weekdays, day_of_month, nth, nth_weekday, and active.
- Ensure the tasks database has a date property named Due.
- Create an n8n Data Table named cadence_last_spawned with columns rule_id, last_spawned_on, and rule_title.
- Add a Slack credential and set the target channel in the Slack message step.
- (Optional) Update the TIMEZONE value in the rule evaluation code to match your preferred day boundary.