Run via the API

Run an Automation from external systems such as Zapier, n8n, or internal tools through the API

Besides running on its schedule, an Automation can be run at any time through the Squadbase API. When something happens in another system, you can build and deliver a report right away.


When to use it

  • Event-driven reports — run an Automation when a deal closes, a form is submitted, or a row is added to a spreadsheet, and deliver the results
  • As part of a workflow — add an Automation as one step in a Zapier, n8n, or Make workflow
  • From internal tools — put a "Create report" button in an internal app that runs the Automation

What you need

  1. An API key — create one from your account settings. See Authentication
  2. The project ID — the ID after project/ in the URL when you open the Automation
  3. The Automation's identifier — the name after automation= in the same URL
https://app.squadbase.dev/space/…/project/<PROJECT_ID>/ai?editorTab=automation&automation=<AUTOMATION_NAME>

The user who created the API key must have Creator access or higher on the project. Keys owned by Viewers cannot run Automations.


Running an Automation

Send this request to run an Automation.

curl -X POST 'https://api.squadbase.dev/v0/automation/<PROJECT_ID>/<AUTOMATION_NAME>/trigger' \
  -H 'x-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{}'

The API responds immediately, and the Automation runs in the background. If it has notify steps, the results are delivered just like a scheduled run.

Use the executionId in the response to check the run's status and result from your code.

If your workflow tool retries failed requests automatically, add an Idempotency-Key header. A retry with the same key does not start a new run; it returns the original one.

For request and response details, error codes, and Python and Node.js examples, see the API Overview.


Limits

  • An Automation that is already running cannot be started again. Call the API after the current run finishes
  • API runs are limited to 60 per hour per team (the limit varies by plan)
  • Automations cannot run when your AI credit balance is 0
  • API runs use AI credits just like scheduled runs. See Automation credit usage