# Using webhooks

Sometimes the moment that should trigger a workflow does not begin in Rox.

It begins in a form submission. A signup event. An internal tool. A system somewhere else in your stack.

That is where webhooks come in.

Webhook-triggered workflows let an external system start a workflow in Rox. Once the webhook arrives, Rox can read the payload, understand the event, and kick off the right next step.

That might mean:

* routing a signup
* sending an alert
* generating a summary
* updating a record
* launching an internal process
* triggering downstream work from another system

#### How to use a webhook trigger

**Step 1**

Choose Webhook as the trigger when building the workflow.

<figure><img src="https://2986926806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUBzWA2LkfjbdaffIaGlN%2Fuploads%2FyA9i4gxdkUpEAXhrAP8p%2Fimage.png?alt=media&#x26;token=388ec32e-fc3f-46cf-b0f1-3bed0574f261" alt=""><figcaption></figcaption></figure>

**Step 2**

Copy the webhook URL or slug from the workflow UI.

Webhook URLs are generated in the UI now, so most users do not need to hand-assemble the endpoint.

<figure><img src="https://2986926806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUBzWA2LkfjbdaffIaGlN%2Fuploads%2FzOqV6d6WaF8lWU9Az8u3%2Fimage%20(108).png?alt=media&#x26;token=a7822106-2528-43e7-8952-5906d08ac003" alt=""><figcaption></figcaption></figure>

**Step 3**

Send a POST request with JSON data to the webhook endpoint.

For new public workflows, use the generated URL from the UI. It will follow the shared webhook pattern:

```bash
curl -X POST https://webhooks.backend.rox.com/webhooks/w/{webhook_slug} \
  -H "Content-Type: application/json" \
  -d '{"feedback":"here's some feedback"}'
```

**Step 4**

Use the payload inside the workflow.

The payload can be any JSON object. That data can then be read and used in later steps.

#### When to use webhooks

Use a webhook-triggered workflow when you want Rox to respond to an event from outside Rox.

Examples:

* Google Form submission
* marketing signup
* internal tool event
* external system update
* custom automation from another platform

A webhook is the outside world tapping Rox on the shoulder and saying:

**this happened. take it from here.**
