> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dust.tt/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Run an agent when an event happens in another system, like a new ticket or a pull request.

A **webhook trigger** runs an agent each time another system sends an event to Dust: a ticket is created, a pull request is opened, an issue changes status. The agent can receive the event data and act on it.

Setting one up takes two steps: a workspace admin creates a **webhook source**, then members add triggers that use it to their agents.

## Built-in and custom sources

* **Built-in sources**: GitHub, Jira, Linear, Zendesk, and Fathom. The admin connects the account and picks the events to watch, and Dust registers the webhook with the provider.
* **Custom webhook**: for any other system that can send HTTP requests. After saving the source, copy its **Webhook URL** and paste it into the system that sends the events. The URL contains a secret, so share it only with that system.

For a custom webhook, you can also have Dust check that each request is signed: under **Advanced settings**, set a **Signature header** and a **Signature algorithm** (sha1, sha256, or sha512). Dust then rejects requests without a valid signature. It generates the signing secret for you, unless you turn off **Auto-generate** and enter your own.

## Create a webhook source (admins)

Only workspace admins can create webhook sources.

**1. Open the triggers page**

Go to **Spaces** > **Triggers** and click **Add source**.

**2. Pick the source**

Pick a provider, or **Custom webhook**.

**3. Set it up**

Name the source. For a built-in source, connect your account and select the events to watch. For a custom webhook, set up the webhook.

**4. Save**

Save the source.

A new source is available to all workspace members. To limit it to members of specific Spaces, open the source's **Sharing** tab.

## Add a webhook trigger to an agent

**1. Pick the source**

In the Agent Builder, go to **Triggers** > **Add triggers** and pick the source.

**2. Set up the trigger**

* **Listen for** (built-in sources): the event that runs the agent.
* **Run only when (optional)** (built-in sources): describe in plain language when the agent should run, and Dust generates the filter.
* **Filter expression (optional)** (custom webhooks): write the filter yourself. See [Filter webhooks payload](https://docs.dust.tt/docs/user-documentation/agents/triggers/webhooks/filter-webhooks-payload.md).
* **Include webhook payload**: send the event data to the agent, so it can use details like a ticket's title or a pull request's author.
* **Message (optional)**: what the agent should do on each run.
* **Rate limits**: the maximum number of runs over 24 hours. See [Rate limiting](https://docs.dust.tt/docs/user-documentation/agents/triggers/webhooks/rate-limiting.md).
* **Credits** and **Where to create this conversation? (optional)**: see [Triggers](https://docs.dust.tt/docs/user-documentation/agents/triggers/index).

**3. Save the agent**

The trigger starts once you save the agent.

Without a filter, every matching event runs the agent, up to the rate limit.

## Related

> [card] [Filter webhooks payload](https://docs.dust.tt/docs/user-documentation/agents/triggers/webhooks/filter-webhooks-payload.md)
>
> Run the agent only on the events you care about.

> [card] [Rate limiting](https://docs.dust.tt/docs/user-documentation/agents/triggers/webhooks/rate-limiting.md)
>
> Cap how often a webhook trigger runs.

> [card] [Triggers](https://docs.dust.tt/docs/user-documentation/agents/triggers/index)
>
> See all the ways to run an agent automatically.

> [card] [Credits usage](https://docs.dust.tt/docs/user-documentation/agents/triggers/credits-usage.md)
>
> Choose whose credits pay for each run.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.