Skip to main content
Esc
Browse docs

Trigger a workflow from your own system

Start a Slovio workflow from any system with the Webhook trigger: the webhook URL, the secret token, an example request and how to use the JSON fields.

3 min readUpdated

The Webhook trigger gives a workflow its own URL. Anything that can make an HTTP POST request (your backend, a website form, another automation tool) can start the workflow, and the JSON it sends becomes variables for the next steps.

Set it up

  1. Create a workflow that starts with the Webhook trigger. For example, open Integrations → Webhook and pick a template. See Workflows.
  2. Select the Webhook trigger. A strong Secret token is filled in for you. You can replace it with your own.
  3. Optional: set Custom header name (optional) if the caller can't send an Authorization header.
  4. Copy the Webhook URL shown on the trigger.
  5. Select Deploy. The URL only accepts requests while the workflow is live.

Call it

Send the token as a Bearer token, with a JSON object as the body:

bash
curl -X POST "https://hook.slovio.ai/v1/webhook/webhook/YOUR_WORKFLOW_ID" \
  -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"phone":"+919876543210","name":"Asha Nair","order_id":"4471"}'

If you set a custom header name, send the token in that header instead. A successful call returns:

json
{ "ok": true }
Response Meaning
200 {"ok":true} The workflow started.
400 The body isn't a JSON object, or the X-Idempotency-Key header has characters other than letters, digits, _, . and - (max 128).
401 The token is missing or wrong.
404 The workflow ID is wrong, or the workflow isn't live.

Use the JSON fields in later steps

Each top-level text, number or true/false field becomes an upper-case WEBHOOK_ variable. For the request above:

Variable Value
{{WEBHOOK_PHONE}} +919876543210
{{WEBHOOK_NAME}} Asha Nair
{{WEBHOOK_ORDER_ID}} 4471
{{WEBHOOK_BODY}} The whole body as text
{{WEBHOOK_RECEIVED_AT}} The time Slovio received it

Nested objects and lists are only available inside {{WEBHOOK_BODY}}, so send the fields you need at the top level. See Variables in chatbots and workflows.

Send a message to the caller

A webhook call doesn't carry a Slovio contact, so a Send WhatsApp Template step right after it has no one to send to. Add these first:

  1. Find Contacts: Find by Phone number, Value {{WEBHOOK_PHONE}}.
  2. Set Active Contact: Contact {{findContacts.firstContactId}}.
  3. Send WhatsApp Template: now goes to Asha.

Avoid duplicate runs

If your system retries on errors, send an X-Idempotency-Key header with a unique ID per event, such as your order number. A repeat call with the same key returns {"ok":true,"deduped":true} and doesn't run the workflow again.

Common questions

Can I send the token in the URL instead of a header?

Not for the Webhook trigger. Send it as Authorization: Bearer <token> or in your custom header. The IndiaMART trigger is the one that carries its token in the URL, because IndiaMART can't send headers.

Can I call the URL with GET?

No. Send a POST with a JSON object body.

Does Slovio have a Zapier or Make app?

No. Use this trigger to start Slovio from Zapier or Make, and the HTTP Request action to call them from Slovio.

What happens if I change the secret token?

Calls with the old token get 401. Deploy the change and update the token in every system that calls the URL.

Stuck, or is something here out of date? Tell the team — we reply within a working day.