Package Information
Documentation
n8n-nodes-cresva
n8n community nodes for Cresva, the AI growth team for ecommerce brands. Ask plain language questions about ad performance across Meta, Google and TikTok, read metrics, creatives, forecasts, attribution and budget recommendations, and start workflows when Cresva detects an anomaly, generates a report or a platform sync starts failing.
Installation · Credentials · Operations · Trigger · Limits
Installation
Follow the community nodes installation guide and install n8n-nodes-cresva.
The package has no runtime dependencies.
Credentials
- Create an API key at cresva.ai/settings/api-keys.
- In n8n, create a Cresva API credential and paste the key.
Keys starting cresva_sk_live_ read your real data. Keys starting cresva_sk_test_ return simulated data, which is useful for building a workflow before connecting an ad account. The credential test lists your brands (GET /v1/brands).
Operations
Every operation takes a Brand, chosen from a dropdown of the brands your key can reach. It is required when your account has more than one brand.
| Resource | Operation | API call |
|---|---|---|
| Question | Ask | POST /v1/query |
| Performance | Get Metrics | GET /v1/metrics |
| Performance | Find Creatives | GET /v1/creatives |
| Performance | Get Attribution | GET /v1/attribution |
| Forecast | Get | GET /v1/forecasts |
| Budget Recommendation | Get | POST /v1/recommendations (recommends only, never changes any budget) |
| Brand | Get Many | GET /v1/brands |
Errors come back as plain messages: an invalid key says so, a forecast that does not exist yet says there is no data for it yet, and a rate limit asks you to retry later. Turn on the node's Retry On Fail setting to retry automatically.
Trigger
Cresva Trigger polls on the schedule you set in n8n.
| Event | Fires |
|---|---|
| New Anomaly | once per newly detected anomaly, optionally filtered by status |
| New Report | once per newly generated report, optionally filtered by type |
| Sync Starts Failing | once per failure episode for each platform. It fires again only after a successful sync is followed by a new failure. |
The first poll after a workflow is activated records what already exists and emits nothing, so activating a workflow does not replay history. A manual test run returns the newest item so there is something to map.
Limits
These come from the Cresva API today:
- No webhooks, so the trigger polls.
- No
updated_atfield, so there is no "updated item" trigger. - No
sinceor cursor parameter; the trigger remembers the ids it has seen. - Report
download_urlis always empty, so New Report cannot attach the file.
Development
npm install
npm run lint
npm test
npm run build
Tests run against fixtures with a recording stand in for n8n's HTTP helper. They never reach the network. Sample data uses the synthetic Birchwell demo brand.