# Start a flow with a webhook

Give your automation its own address so any other system can start a run just by sending it data.

Source: https://support.rework.com/article/start-a-flow-with-a-webhook

A webhook is the most flexible way to start an automation. The app gives you an address, and anything that can send an HTTP request to it starts a run, from a website form to another tool your team uses. Whatever is sent with the request becomes data your steps can use. Here's how to set one up.

## Step 1: Pick the Webhook trigger

- On an empty canvas, click **Choose trigger**. On an existing flow, open the trigger and use **Change node**.
  
- Search for **Webhook** and pick it.
  

## Step 2: Copy the receiver URL

Open the trigger. Its panel holds everything the sending system needs:

- **Receiver URL** is this automation's own address. Click the copy button next to it and paste it into the system that should start the automation.
  
- **method** decides what the URL accepts: leave it on **POST** so callers can send a JSON body, or pick **GET** for a plain call with no body.
  

![The webhook trigger panel with the receiver URL, the copy button and the method](https://storage.googleapis.com/reworkv3-public/success/260923/529e3NPWMci9d3ExAjORImzrKndEdu92kQK5w6oQeQ6InoAVyyULaZ2CZN8ff3RQ/img.I5bLFcy6HUKW36FaKzGtAFQku5k2NZTKd6d6WwpgfpkwTaSCuMHQXmIafYY4Wf31.png)

> **Note:** The URL only works once the automation is published, and a disabled automation turns requests away. See [Publish an automation](https://support.rework.com/article/publish-an-automation) and [Rename, move or turn off an automation](https://support.rework.com/article/rename-move-or-turn-off-an-automation).

## Step 3: Send a first request

Ask the other system to send its request, or send one yourself from a terminal:

`curl -X POST "<your receiver URL>" \`  
`-H "Content-Type: application/json" \`  
`-d '{"name": "Jolie", "email": "jolie@northwind.studio", "buddy": "Duke"}'`

The app answers immediately and runs the flow in the background, so the sending system never has to wait for your steps to finish.

## Step 4: Capture a sample to build against

To fill in the steps below the trigger, you'll need to know what the request actually contains.

- Click **Test** in the top bar to open the test panel.
  
- The **Captured** tab lists the requests this webhook has received. Click **Reload captures** after sending one.
  
- Open a capture to see its payload, and use **Execute** to replay it through the draft.
  

![The Test panel with the Captured tab and its guidance](https://storage.googleapis.com/reworkv3-public/success/260923/4anPCdi5EK5gnlbJdKbGwidoKjc1wvWnMWRjxN0qROvCtUW4Gl426McCWjcWZ1Tf/img.jq8oSywnWuCORlWOh1qFPqUlKicrCAIb9FYjib6V12ZA3gmX35m1997dG4Vqspc3.png)

See [Test the whole flow](https://support.rework.com/article/test-the-whole-flow) for the rest of the panel, including the **Manual** tab where you can paste a JSON body by hand.

## Step 5: Use the data in the steps below

Everything sent in the body is available to later steps as `{{trigger.body.<field>}}`, for example `{{trigger.body.email}}`. The trigger's result in any run shows the exact shape that arrived, which is the quickest way to see the field names you can use. 💡

![The webhook step's output in a run, showing the fields that arrived](https://storage.googleapis.com/reworkv3-public/success/260923/4HUSRLIATT6IRYpnc42VpY5qx2r5s28FHS02sSjPZadISOZkcCTwUpa3ivq6kaqp/img.n48u6AwQDyHdRrTYnjA1oDzEfyr0YTvCFsiGQP8G0Qp1KD7GtIckez2IgzTovo3M.png)

Insert those values from the **Data Selector** rather than typing them. See [Pass data between steps](https://support.rework.com/article/pass-data-between-steps).
