Action Chains
Owner-defined chains of steps (e.g. render a PDF, mail it, hand it to Make or QuickBooks) that you or a person on your own admin pages start with one call. The run continues on the server after the page is closed. Every step gets its own status and receipt; a failed step can be tried again on its own, and a step whose outcome is unknown (a timeout) is never sent again by itself. The records a run works on are read by the server and checked against what was approved. Paid plans.
Try it with your AI assistant
Once WebsitePublisher is connected to your AI assistant, paste one of these into the chat. Replace the parts in [brackets] with your own details.
@WebsitePublisher create an action chain that renders the invoice of a job as PDF, mails it to the customer and then sends it to my [Make] proxy endpoint@WebsitePublisher add a button to my admin page that starts the [invoice-dispatch] chain for this job and shows the status of every step@WebsitePublisher show the runs of my [invoice-dispatch] chain that need attention and whyWith WebsitePublisher, create an action chain that renders the invoice of a job as PDF, mails it to the customer and then sends it to my [Make] proxy endpointWith WebsitePublisher, add a button to my admin page that starts the [invoice-dispatch] chain for this job and shows the status of every stepWith WebsitePublisher, show the runs of my [invoice-dispatch] chain that need attention and whyWith WebsitePublisher, create an action chain that renders the invoice of a job as PDF, mails it to the customer and then sends it to my [Make] proxy endpointWith WebsitePublisher, add a button to my admin page that starts the [invoice-dispatch] chain for this job and shows the status of every stepWith WebsitePublisher, show the runs of my [invoice-dispatch] chain that need attention and whyEndpoints (10)
Create or replace an action chain (send the whole definition; with only chain_key and is_active it switches the chain on or off). inputs: the values a run gets from its caller, name => {"type": "integer|string|number|boolean|email|array", "required": true, "max": 500, "items": "integer|string", "max_items": 20}. load: records the server reads itself when a run starts, key => {"entity": "jobs", "id_from": "<input>"} or {"entity": "certificates", "ids_from": "<array input>"}, with "expect": {"field": "value" or {"input": "<name>"}} to refuse the run (409) when the data changed since it was approved. unique_by: input names, one run per combination (a second start returns the same run); without it every start needs a request_id. steps: 1-10 {"service", "endpoint", "input_template", "replay", "retry_safe", "on_done": {"update": {"record": "<load key>", "fields": {...}}}}. Templates: {{fields.input.X}}, {{fields.records.KEY.FIELD}}, {{fields.run.id}}, {{fields.run.step_key}} (the same on every try of a step: pass it to a receiver that deduplicates), {{fields.run.now}}, {{steps.N.result...}}. replay: true lets a step that changes nothing (e.g. pdf_document render-template with "store": false) run again to rebuild its output for a retried later step; other steps lend their receipt. retry_safe: true says repeating the step is harmless, so even a timeout may be retried. Not allowed as steps: account, payment and platform integrations. on_success.update runs after the last step. allow_admin (default true), admin_retry (default true), admin_resolve (default false): what admin pages may do. daily_cap: runs per day (default 200). Owner only. Paid plans.
| Field | Type | Required | Description |
|---|---|---|---|
chain_key |
string | ✓ Yes | Short id, lowercase letters, digits, - and _. Example: "invoice-dispatch". |
label |
string | No | |
inputs |
array | No | |
load |
array | No | |
unique_by |
array | No | |
steps |
array | No | Required unless only is_active is sent. |
on_success |
array | No | |
allow_admin |
boolean | No | |
admin_retry |
boolean | No | |
admin_resolve |
boolean | No | |
daily_cap |
integer | No | |
is_active |
boolean | No |
The action chains of this project, or one (chain_key). The owner gets the full definition; an admin page gets only the chains it may start, with their inputs and step names.
| Field | Type | Required | Description |
|---|---|---|---|
chain_key |
string | No |
Delete an action chain. Runs that are still waiting are skipped; finished runs stay readable until they are cleaned up. To pause instead, use set-chain with is_active false. Owner only.
| Field | Type | Required | Description |
|---|---|---|---|
chain_key |
string | ✓ Yes |
Dry run: checks the input, reads and checks the records (expect) and shows the step input as far as it does not depend on earlier steps. Plans and sends nothing. Owner only.
| Field | Type | Required | Description |
|---|---|---|---|
chain_key |
string | ✓ Yes | |
input |
array | No | The input of the run, name: value. |
Start a run of a chain and return at once with run_id and the steps; the run continues on the server. With unique_by in the chain, a second start for the same values returns the same run (existing: true) instead of a new one; otherwise send request_id (8-100 characters, the same on every try). Errors: 409 when the records changed since they were approved (expect) or the chain is switched off, 404 when a record is missing, 429 at the daily limit. Paid plans.
| Field | Type | Required | Description |
|---|---|---|---|
chain_key |
string | ✓ Yes | |
input |
array | No | The input of the run, name: value, as declared in the chain. |
request_id |
string | No | Your id for this start; required when the chain has no unique_by. |
One run: status (queued, running, done, failed, needs_attention, cancelled, skipped), and per step its status (pending, running, done, failed, unknown, skipped, not_run), attempts, receipt (small values such as a message id, never documents or keys), error and who settled it. waiting_on names the step a person must act on. include_data (owner only) adds the input and the records the run was started with.
| Field | Type | Required | Description |
|---|---|---|---|
run_id |
integer | ✓ Yes | |
include_data |
boolean | No |
Runs, newest first. Filters: chain_key (required for admin pages), status (pending, running, done, failed, skipped, cancelled), subject (the unique_by values as "name=value,name=value", or the request_id). Next page: before_id = next_before_id.
| Field | Type | Required | Description |
|---|---|---|---|
chain_key |
string | No | |
status |
string | No | |
subject |
string | No | |
limit |
integer | No | Default 25, max 100. |
before_id |
integer | No |
Try one failed step again and go on from there. Only a step that certainly did not happen (status failed) qualifies, at most 3 tries; earlier steps are not sent again. A step with an unknown outcome needs resolve-step.
| Field | Type | Required | Description |
|---|---|---|---|
run_id |
integer | ✓ Yes | |
step |
integer | ✓ Yes | Step number, 0 for the first. |
Settle a step whose outcome is unknown (or a failed step) after checking the receiver: as "done" (it happened; go on without sending it again) or as "retry" (send it again on purpose, accepting a possible duplicate). note is required and kept with the step. Owner, or admin pages when the chain has admin_resolve.
| Field | Type | Required | Description |
|---|---|---|---|
run_id |
integer | ✓ Yes | |
step |
integer | ✓ Yes | |
as |
string | ✓ Yes | |
note |
string | ✓ Yes |
Cancel a run that is waiting or stopped; steps that did not run are skipped and the same subject can be started again. A running run cannot be cancelled.
| Field | Type | Required | Description |
|---|---|---|---|
run_id |
integer | ✓ Yes |
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| set-chain | action_chains_set_chain |
| get-chains | action_chains_get_chains |
| delete-chain | action_chains_delete_chain |
| preview-run | action_chains_preview_run |
| enqueue-run | action_chains_enqueue_run |
| get-run | action_chains_get_run |
| list-runs | action_chains_list_runs |
| retry-step | action_chains_retry_step |
| resolve-step | action_chains_resolve_step |
| cancel-run | action_chains_cancel_run |
Website