n8n
The Statable node puts your analytics inside n8n workflows. Send a weekly traffic summary to Slack, alert on a spike in current visitors, copy daily numbers into a spreadsheet, or let an n8n AI Agent answer questions about your site.
The node only reads. It never creates or changes a site, a goal or a funnel, and nothing it does touches the analytics themselves.
Install
The node is the npm package n8n-nodes-statable.
On self-hosted n8n, open Settings → Community Nodes → Install and enter n8n-nodes-statable. The n8n guide to community nodes covers the other ways to install one. n8n Cloud offers only the community nodes n8n has verified.
Connect a key
The node signs in with a Statable API key.
- In Statable, open Settings → API keys and select Create API key.
- Choose All sites or one site. Read analytics is enough for everything the node does.
- Copy the key. It starts with
stbl_and is shown only once. - In n8n, create a Statable API credential and paste the key.
n8n checks the key when you save the credential. Expiry, rotation and permissions are covered in Authentication.
Operations
| Resource | Operation | What it returns |
|---|---|---|
| Report | Query | Totals, a time series or a ranked breakdown, for any metrics, date range, grouping and filters |
| Site | Get Many | The sites the key can read, optionally with headline numbers |
| Realtime | Get Current Visitors | Unique visitors active in the last five minutes |
| Property | Get Many | The custom property keys a site has recorded, per event |
| Goal | Get Many | The goals configured for a site |
| Funnel | Get Many | A site's saved funnels |
| Funnel | Get Report | Visitors, conversion rate and drop-off for each step of a saved funnel |
| Account | Get Subscription | The plan state of the account that owns the key |
Report → Query
The node's most flexible operation is the Stats API query with fields instead of JSON.
- Metrics. Visitors, pageviews, visits, visit duration, bounce rate, views per visit and engagement time, plus the breakdown-only ones such as time on page, scroll depth, events and conversion rate.
- Date Range. The last 7 or 30 days, the current month, the last N days (1 to 90), realtime, or a custom range of up to 366 days. Days follow the site's timezone.
- Group By. Nothing for totals; minute, hour, day, week or month for a series; or a breakdown by page, source, channel, country, device, UTM parameter, goal, custom event, custom property and more.
- Filters. Several filters combine with AND. Comma-separated values inside one filter combine with OR.
- Compare to Previous Period. Adds the previous value and the percent change to each row.
- Simplify. On by default: one flat item per row, such as
{ "visit:country": "US", "visit:country:label": "United States", "visitors": 206 }. Turn it off for the raw response with its paging details.
Which metrics each breakdown can compute is in the query reference. An unsupported combination fails with the API's own error message.
With the AI Agent
The node is available as a tool for n8n's AI Agent. Add it to the agent's tools, and the agent picks the operation and fills in the fields from the question it was asked.
Examples
- Weekly top pages to Slack. Schedule Trigger on Mondays, then Report → Query with Visitors and Pageviews over the last 7 days, grouped by page, limited to 10, compared with the previous period, then Slack.
- Traffic history to a sheet. Schedule Trigger weekly, then Report → Query with Visitors, Pageviews and Bounce Rate over the last 7 days, grouped by day, then Google Sheets, one row per day.
- Where sign-ups came from. Report → Query grouped by source, with the filter
eventisSignup. - A custom property breakdown. Property → Get Many to find the key, then Report → Query grouped by custom property, with the property key and a filter on the event that carries it.
Limits
Every run is ordinary Stats API traffic, so it counts against the key's rate limits. A schedule that fires every minute across many sites reaches them sooner than one that runs daily.
The node was tested with n8n 2.38 and needs a version that supports community nodes API version 1.
Ready to take control of your web analytics? Try Statable free for 30 days. No credit card required, full feature access, built for GDPR. Start your free trial or view a live demo.