Other systems starting and answering automations
Give another system an address that starts an automation, and wait for its answer in a workflow.
What it's for
Other systems can work with your automations both ways: an automation can send records to them (see Connections), another system can start an automation, and a workflow can wait for another system to answer.
Letting another system start an automation
- In the automation, under When, choose is sent by another system. Add conditions under If if only some records should be acted on.
- Save. The automation's page shows Address for other systems.
- Copy the address and set the other system to send a POST request with JSON to it.
- Turn the automation on. Requests are refused while it is off.
What to send:
{"record": "PO-00042", "data": {"reference": "ABC-1"}}
recordis the record's number as it shows in the ERP. Or send"id"with the record's id.- Anything under
datacan be used in messages:{{ request.reference }}.
| The answer | What it means |
|---|---|
202 with "started": true | The automation is running for that record. For a workflow, the answer has a reply_url too. |
200 with "started": false | The record doesn't match the conditions under If. |
| 404 | The address is wrong or was replaced, or no record has that number. |
| 409 | The automation is off, or a workflow is already running for that record. |
| 429 | More than 60 requests in a minute. Try again shortly. |
Waiting for another system to answer
A workflow can send a record to another system and wait for its answer, for example "send the order to the warehouse, then wait until it says the goods were picked".
- Add Send to another system. What it sends includes
reply_url, the address to answer at. - Add Wait for another system after it, with the steps for when the answer comes.
- To stop waiting after a while, tick Give up waiting after and add what should happen under If there is no reply in time.
The other system POSTs JSON to reply_url, for example {"status": "picked"}. Later steps use it as {{ reply.status }}. An answer that comes before the workflow reaches the wait is kept and used when it gets there. Once the run has finished, the address answers 410.
During a trial
Records sent during a live trial include "trial": true, so the other system can tell test records apart.