A workflow can start by itself. A schedule runs it at set times, and a webhook runs it when another service sends it a request. Both are set on the workflow's Trigger step and take effect when you publish.
To start a run from your own code with an API key instead, see Run workflows over the API.
Each workflow has one live revision, the one you published last. Schedules and the webhook always start that revision.
- Publishing a new revision moves the schedules to it. The schedules of the previous revision are switched off in the same step, so a workflow never runs twice for one time.
- Schedules and the webhook are part of the published revision. Changing the Trigger step in the editor changes nothing until you publish.
- The webhook URL and secret stay the same when you publish.
- A schedule that is switched off in the Trigger step does not run.
A schedule is a cron rule and a time zone. A workflow can have up to 5 schedules, and each one can be switched on or off.
| Part | Rule |
|---|---|
| Rule | Five fields: minute, hour, day of the month, month and day of the week. For example, 0 9 * * 1-5. |
| Time zone | An IANA time zone name, such as Europe/London or America/New_York. The rule is read in that zone, so it follows daylight saving time. |
| Frequency | At least 5 minutes between runs. A rule that fires more often is refused when you publish. |
| Number | Up to 5 on one workflow. |
0 9 * * 1-5 Every weekday at 09:00
*/15 * * * * Every 15 minutes
30 6 1 * * At 06:30 on the first day of each monthA scheduled run carries no input, so a workflow with a required input cannot have a schedule: publishing is refused until the input is optional or the schedule is removed.
A scheduled run counts against your run quota, like any other run, and shows schedule as its trigger in the run history.
Turn on the webhook in the Trigger step and publish. Hollow gives the workflow a URL and a secret.
Webhook starts refuse workflows containing Call automation, Hollow action or connected-account steps, including inside a loop, with WORKFLOW_ACTION_UNSUPPORTED, because the invoking authority cannot yet follow those steps safely. Start those workflows manually in Platform.
POST https://api.projecthollow.com/v1/platform/hooks/HOOK_IDHOOK_ID is a long random string that belongs to this workflow. The address does not need an API key. The secret is what proves the request is yours.
- Send the secret as a Bearer token in the
Authorizationheader, or in theX-Hollow-Hook-Tokenheader. Never put it in the address: a query string is logged by proxies and browsers, so Hollow does not read it. - The secret is shown once, when you turn the webhook on or rotate it. Hollow keeps only a one-way hash and the first few characters, so it cannot be shown again. Store it in your secret manager.
- Rotate the secret if it may have been seen. Rotation gives a new secret and shows it once.
- Turning the webhook on, rotating the secret and turning the webhook off each need a sign-in within the last 15 minutes.
- Turn the webhook off to stop accepting requests.
Send a JSON object as the body, up to 16 KB. The body becomes the run's trigger payload, and the steps read its fields as trigger.payload. It is treated as data only and cannot change what the workflow does.
curl -X POST 'https://api.projecthollow.com/v1/platform/hooks/HOOK_ID' \
-H "Authorization: Bearer $HOLLOW_HOOK_SECRET" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-20417" \
-d '{"orderId": "20417", "total": 129.5}'A request that is accepted returns 202 with the run id and its status. The webhook does not wait for the run. Read the run in the run history, or by its id as described in Run workflows over the API.
{
"id": "run_5t9c1d",
"status": "queued"
}Send an Idempotency-Key header with a value that is unique to the event, such as an order number. If the sender retries with the same key, you get the first reply back with the header Idempotent-Replay: true and no second run starts.
- A webhook run counts against your run quota, and a webhook accepts up to 60 starts a minute.
- A request with a missing or wrong secret is refused with HTTP 401 and the code
INVALID_HOOK_SECRET, and a body that is not a JSON object of at most 16 KB is refused with HTTP 400. Neither starts anything. - A workflow whose automation is paused in Cascade refuses webhook and API starts with HTTP 409 and the code
WORKFLOW_PAUSED. Resume it in Cascade to start runs again. - Too many starts is HTTP 429 with the code
RATE_LIMITEDand aRetry-Afterheader, and a used-up run quota is HTTP 429 with the codeQUOTA_EXCEEDED. See Run workflows over the API for the codes.
Use the test address to see what a sender really sends, so you can pick its fields in the editor without running the workflow.
- In the Trigger step, start listening for a test request. The editor listens for 10 minutes.
- Send a request to the test address with the same secret and a JSON body.
- The editor shows the body, and you can choose its fields when you fill in later steps.
POST https://api.projecthollow.com/v1/platform/hooks/HOOK_ID/test- A test request never runs the workflow and costs nothing. It returns
202with{ "received": true }. - Only the latest test body is kept, for 30 minutes. A new one replaces it.
- A test request is accepted only while the editor is listening. Outside that window it is refused with HTTP 409 and the code
HOOK_NOT_LISTENING.
{
"received": true
}Note: Payloads and secrets
Do not send passwords, card numbers or other secrets in a webhook body. The body is kept with the run so that a run that waits can carry on with it.