Make
In Make (formerly Integromat) the module "Webhooks, Custom webhook" receives events from here, and the module "HTTP, Make a request" calls the API.
Receive events:
- Create a scenario with the first module "Webhooks", "Custom webhook", "Add", and copy the address.
- Add the address under Settings, Webhooks as an endpoint and choose the events.
- Click "Run once" in Make and track an entry; Make recognises the structure by itself.
Control the timer from a scenario:
- Under Settings, API and devices, add a device or a token with the permission "Trigger".
- Add the module "HTTP", "Make a request" and enter the values below.
URL: https://api.horaka.com/v1/track/switch
Method: POST
Headers: Authorization = Bearer YOUR_TOKEN
Body type: Raw
Content type: JSON (application/json)
Request content: {"project": "PROJECT"}
Parse response: Yes
With "Parse response", data.running and meta.action (started, stopped, switched, unchanged) are available to the next modules.