Skip to main content
The Chronicle Aggregation resource (on the Worlds Actions node) queries chronicles over a time range and aggregates them — raw list, rollup summary, or grouped by dimension. The Activity Chronicle Trigger reacts to chronicles as they happen (push), while Chronicle Aggregation pulls a window of chronicles on your schedule.

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

For a daily digest, set the Schedule Trigger to run once a day and leave Time Range on its default Relative Window — each run automatically covers the period since the last one, with no date math in the workflow.

Parameters

Record Kind

Event chronicles are point-in-time (they carry only a timestamp, no start/end interval) and are owned by chronicle producers, not sites or data sources. Site IDs and Data Source IDs filters never match event chronicles. Internally, an event chronicle is treated as a zero-length interval (start = end = timestamp) for window matching, which also means Include Open Chronicles is a no-op for them — they’re always considered closed.

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 carries item_type so downstream nodes can branch on shape: chronicle, group, rollup, or (raw mode only, when truncated) meta.
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 calls POST /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 Amount 24, Window Unit Hours
  • 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.
  • Worlds Actions — other resources on the same node, including Send Worlds Email
  • State Machine API — POST /api/chronicles/query request/response schema