When to use
Use Chronicle Aggregation whenever a workflow needs to summarize activity over a period rather than react to a single chronicle event — daily digest emails, shift reports, compliance rollups, or any downstream logic that wants “everything that happened in the last N hours” as one set.This resource does not self-schedule. Pair it with n8n’s built-in Schedule Trigger node — the trigger fires on a cron schedule, and Chronicle Aggregation resolves the query window at execution time.
The Schedule Trigger pattern
Parameters
Record Kind
Chronicle Producers
Time Range
Relative windows resolve
start_time/end_time at execution time, computed from now — this is what makes the resource cron-friendly under a Schedule Trigger. Explicit Start/End is useful for backfills, ad hoc reports, or when the window comes from elsewhere in the workflow (e.g. an expression referencing the last run’s data).
Output
Additional Filters
All filters are comma-separated string lists, applied after fetching (OR within a field, AND across fields).Advanced options
Time match semantics
With Overlap Window, a chronicle that started well before the requested window but is still running (or ended just after the window opened) still counts — the state machine looks backward from
start_time by Overlap Lookback (Days) (default 7, mirroring the state machine’s default chronicle state TTL) to find candidates. Beware: a producer that never sets end_time leaves all its chronicles permanently open, so Overlaps Window returns its entire backlog in every window — Started in Window (the default) is immune to this.
Output modes
Every output item carriesitem_type so downstream nodes can branch on shape: chronicle, group, rollup, or (raw mode only, when truncated) meta.
- Raw
- Rollup
- Grouped
- Raw List + Rollup
One n8n item per chronicle, tagged
item_type: "chronicle". Nothing else is added — no meta wrapper, since there’s no single item to carry it on.If the match count exceeded Limit, an extra trailing item is emitted with
item_type: "meta" carrying the full meta object (including truncated: true) — this is the only way raw mode surfaces truncation, since individual chronicle items have nowhere else to carry it.Truncation
meta.total_matched is the retained (post-truncation) count, and meta.truncated is true when the actual match count exceeded Limit. Rollup and grouped aggregates are computed over the retained set only, not the full match set — a truncated rollup or group is still internally consistent, just incomplete. Check meta.truncated (embedded on rollup/grouped items, or the trailing meta item in raw mode) before treating counts as exhaustive, and narrow the time range or filters if you hit it regularly.
Credentials
Requires GraphQL Subscription API credentials, same as other Worlds Actions resources. Credentials are sent per-request to the state machine and are never persisted there.Deploy order
Chronicle Aggregation callsPOST /api/chronicles/query on the state machine. The state machine must be upgraded before this node is used — against an older state machine that doesn’t have this endpoint, the node fails with a clear error telling you to upgrade n8n-state-machine, rather than a generic HTTP failure.
Example: daily digest email
1
Schedule Trigger
Add a Schedule Trigger node set to run once a day (e.g. 7:00 AM).
2
Worlds node — Chronicle Aggregation
Add a Worlds node, resource Chronicle Aggregation, operation Query.
- Record Kind:
Activity Chronicles - Time Range:
Relative Window, Window Amount24, Window UnitHours - Output:
Raw List + Rollup - Additional Filters → Statuses:
active, closed(skip anything still pending)
3
Filter the rollup item
Use an IF node checking
{{$json.item_type}} === "rollup" to split the single summary item from the per-chronicle items.4
Build the email
On the rollup branch, use a Set node to compose subject/summary text from
total, by_status, by_label, etc. On the chronicle branch, use an Aggregate or HTML node to render the per-chronicle list as the email body table.5
Send Worlds Email
Wire both into the Worlds Actions node’s Send Worlds Email resource (see Worlds Actions) to deliver the digest.
Related
- Worlds Actions — other resources on the same node, including Send Worlds Email
- State Machine API —
POST /api/chronicles/queryrequest/response schema

