Scheduled Exports
Data Hub > Scheduled Exports runs a query at set times and delivers the result. Only organization OWNER / ADMIN can create and change exports.
1. Create one
The easiest way is to check the query in Data Explorer and press Schedule export. The form opens with connector, fields, range and filters filled in.
| Field | Description |
|---|---|
| Name | Shown in the email subject and Slack message |
| Destination | Email (CSV attachment), Slack, Webhook (HTTPS POST) |
| Recipients / URL | Email: up to 10 recipients. Slack: an Incoming Webhook URL https://hooks.slack.com/.... Webhook: an https:// URL (no private networks, IP addresses or localhost) |
| Body format | Webhook only: JSON or CSV |
| Connector, fields | Same as Data Explorer. Fields and filters are checked on save; invalid ones are rejected |
| Accounts | Optional. Comma-separated account ids. Filled in when you come from Data Explorer with accounts selected, cleared when you change the connector. Empty means all accounts |
| Date range | Preset evaluated at run time. yesterday suits a daily summary, last_7d a weekly one |
| Schedule | Hourly (at :05), Daily (at HH:05), Weekly (weekday at HH:05), in the organization timezone |
| Enabled | Disabled exports don't run |
Each run sends up to 10,000 rows. An organization can have up to 50 exports.
2. What each destination receives
Email — subject [AdStage] Name — start ~ end, a totals summary in the body, and the full result as a CSV attachment (with a BOM for Excel).
Slack — name, organization, range, row count, totals and the first 15 rows as a table. Use email or a webhook for the full data.
Webhook — a POST to your URL.
| Header | Value |
|---|---|
Content-Type | application/json or text/csv; charset=utf-8 |
X-AdStage-Export-Id | Scheduled export id |
X-AdStage-Timestamp | Send time (Unix seconds) |
X-AdStage-Signature | sha256= + HMAC-SHA256(signing secret, timestamp + . + body) |
A non-2xx response counts as a failure. Redirects are not followed. Respond within 30 seconds.
3. Verifying the webhook signature
When you create a webhook export, its signing secret (whsec_…) is shown once. Verify requests like this and reject timestamps older than 5 minutes.
Node.js
Python
4. Run history and failures
- The list shows the last run time and result (
SUCCESS+ row count /FAILED+ reason) and the next run time. - Run now (▶) sends once immediately. The next scheduled time stays the same.
- A failed run is retried on the next schedule. After 10 consecutive failures the export turns itself off. Fix the cause (URL, recipients, fields) and turn it back on.
- When editing, leave the URL empty to keep the saved URL (the screen shows it only partially).

