Implement reactions using Automate.io
This page describes how to implement Automate.io actions in Serialized.The action type (AUTOMATE_POST
) requires the field targetUri
to be populated with a valid Automate.io webhook URI (
i.e. starting with https://wh.automate.io/webhook
). The map valueMap
is used for storing the (up to nine) dynamic
values. Simple templating is supported and event data can be accessed using dot (.) notation.
Example of a Reaction posting a request to Automate:
{ "reactionName": "automate-payment-notifier", "feedName": "payment", "reactOnEventType": "CaptureCompleted", "action": { "actionType": "AUTOMATE_POST", "targetUri": "https://wh.automate.io/webhook/<your-key>", "valueMap": { "value1": "Payment made by ${event.data.customerId} with amount ${event.data.amount}.", ... "value9": "Some more data" } }}
Given this event:
{ "eventId": "ca37d05c-a852-4de5-961f-16fb35e8cd7b", "eventType": "CaptureCompleted", "data": { "customerId": "some-test-id-1", "amount": 12345 }}
the request body POST:ed to Automate.io would look like this:
{ "value1": "Payment made by some-test-id-1 with amount 12345.", ... "value9": "Some more data"}