Skip to content

Start an automation from another system ​

Use the Webhook received trigger when another system must start the automation: a form tool, your own server, a payment terminal.

Step 1: Create the URL ​

  1. Choose Webhook received as the trigger and save the automation.
  2. Click the trigger, then create its private URL.
  3. Copy the URL straight away. For safety it is shown only once.

Keep the URL secret: anyone who has it can start the automation. If it leaks, replace it in the same place. The old URL stops working at once.

Step 2: Send JSON to the URL ​

bash
curl -X POST "<your automation URL>" \
  -H "Content-Type: application/json" \
  -d '{"orderid": "A-1042", "customer": {"name": "Jane", "email": "[email protected]"}}'

Rules for the call:

RuleValue
MethodPOST
BodyOne JSON object, at most 64 KB
RateAt most 60 calls a minute for each automation
Automation stateThe automation must be switched on

Step 3: Read the response ​

StatusMeaning
202Accepted. The run is queued and starts shortly.
400The body is not a JSON object, or is larger than 64 KB.
404The URL is wrong, was replaced, or the automation is switched off.
429Too many calls. Try again in a minute.

A 202 means the call was accepted, not that the run has finished. Look in Runs for the result.

Step 4: Use what was sent ​

Steps read the JSON with {{body.<field>}}. With the example above, {{body.orderid}} is A-1042 and {{body.customer.name}} is Jane.

Good to know ​

  • Each call makes one run. Calls are not combined.
  • The automation must be switched on. A call to a switched-off automation is answered with 404, and nothing runs.
  • Conditions can compare any field of the JSON, written as body.<field>.
  • A webhook URL is tied to one automation. To start several automations from one call, give each its own URL, or have one automation do the work of both.

Cashfin Business API Documentation