> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/tools/webhook.md).

# Webhook

The **Webhook** tool allows you to trigger a MESA workflow from a third-party service. It can similarly be thought of like a notification. It lets a third-party service start a workflow in MESA when something happens in your third-party service.

With Webhook, you can create a chain reaction of events that allows you to focus more on your store than work on repetitive tasks.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FWRbfqOyMVz0OXc8I412E%2Fimage.png?alt=media&amp;token=75c98c2c-4a00-4b04-b6cc-eab3377b313f" alt="Screenshot of a MESA workflow using the Webhook tool to trigger the workflow from a third-party service. Spotlight the Webhook trigger step."><figcaption></figcaption></figure>

## Set up a Webhook trigger <a href="#setup" id="setup"></a>

When creating a new workflow, you can select the **Webhook** tool as the trigger.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F1vTMHAzY6yHwOHr7ozLw%2Fimage.png?alt=media&amp;token=bca75a09-fe05-4d3f-bf5c-1adaf4a6f6f9" alt="Screenshot of creating a new MESA workflow and choosing a trigger. Spotlight the Webhook tool in the trigger list."><figcaption></figcaption></figure>

## Add a Webhook URL to your app that you want to connect with <a href="#webhook-url" id="webhook-url"></a>

Hit the Copy button to copy the link from the Webhook URL field and add it to your app in order for MESA to receive notifications from your third-party application.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FQDO7j7D7J8jCYB6L0PZm%2Fimage.png?alt=media&amp;token=4244e8bc-6f95-4057-a383-e215ec5726cd" alt="Screenshot of the MESA Webhook trigger configuration showing the Webhook URL field. Spotlight the Copy button next to the Webhook URL."><figcaption></figcaption></figure>

## Send data to a webhook <a href="#sending-data" id="sending-data"></a>

After adding the Webhook URL to your app, data coming from your third-party application is sent to MESA's Webhook trigger in the form of a JSON payload.

## Manually run your webhook <a href="#testing" id="testing"></a>

You will want to manually run your Webhook trigger by sending a notification from your third-party application.

To check the payload coming from your third-party application, click on the **Activity** tab of your workflow in the MESA dashboard. Then expand the recent run of your workflow, click the 3 vertical dots on the right side of the **Webhook** text, and then click **Request Details**.

![Screenshot of the MESA workflow Activity tab with a recent Webhook run expanded and the three vertical dots menu open on the Webhook step. Spotlight the Request Details option.](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-321e97bcafbe4adce5f009c87a7f70b1e711b800%2Ffile-xcwbshufdy.png?alt=media)

On subsequent steps, you can create variables that reference the data that is received in the Webhook trigger. For example, you can use the variable: `{{webhook.team_domain}}`

## Limitations <a href="#limitations" id="limitations"></a>

You are unable to send data back to the request. MESA can only receive data coming from the third-party application.

Variables will not be selectable from the Webhook trigger from the Variables menu on subsequent steps. You will need to manually create the variables following the format: `{{webhook.team_domain}}`

## Examples and use cases <a href="#examples" id="examples"></a>

**Webhook** provides the ability to integrate or provide additional capabilities with third-party applications that are currently not supported in MESA. For example, you can trigger a workflow using a Slack command.

![Screenshot of a MESA workflow triggered by a Webhook from a Slack command. Spotlight the Webhook trigger step.](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F6VwzPKmcohInuTYiBfty%2FAS-WEBHOOK-SLACK.png?alt=media\&token=a1d77e06-c016-49db-8cec-8ae86837cc23)

![Screenshot of the Slack app command settings where the MESA workflow Webhook URL is added. Spotlight the Request URL field for the Slack command.](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FDMURcZIfWk2oyz2FZTUD%2FAS-SLACK-COMMAND.png?alt=media\&token=6b34ccdb-37c5-40b2-bfa1-adedc44d9d35)

After creating an app in Slack and adding a command, you can add the Webhook URL from your MESA workflow to the settings of your Slack command.

When messaging on Slack, you can type in the command and hit Enter to trigger the workflow in MESA.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.getmesa.com/tools/webhook.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
