# WebHooks

## What is a Webhook?

A feature that lets you **receive real-time notifications** when tasks are completed or specific events occur in web apps. When you integrate Listly with enterprise messaging apps like Slack, you can receive real-time notifications when data extraction completes.

***

## How to use it

### Integrating Slack Webhook

{% hint style="info" %}
**Quick start**

➡️ Add Incoming Message app to Slack ➡️ Add webhook to Listly task ➡️ Receive notifications in desired Slack channel via data re-extraction or scheduler
{% endhint %}

{% stepper %}
{% step %}
**Log in to Slack, then click on the following link.**

Incoming WebHooks: <https://slack.com/marketplace/A0F7XDUAZ-incoming-webhooks>
{% endstep %}

{% step %}
**Add it to Slack.**

<figure><img src="/files/wHzzdMsgiQKeZ20SDuEO" alt=""><figcaption></figcaption></figure>

After clicking <mark style="color:red;">**`Add to Slack`**</mark> , select which channel to receive notifications in. At this step you can also add a new channel for notifications and set the name of the bot that sends extraction result messages. Copy the <mark style="color:red;">**`Webhook URL`**</mark> needed for Listly service integration, then click save settings.

<figure><img src="/files/b467beee57a0b799ec38046dab7af825f494cfb6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In Listly [Databoard](https://www.listly.io/databoard), find the task you want to receive result notifications for and click the <mark style="color:red;">**`Data`**</mark> button on the right. Then click the <mark style="color:red;">**`Hook`**</mark> button on the right side of the top menu as shown below to open the webhook settings window.

<figure><img src="/files/64f49073bb87c6a54417b458f90c1886257d1afe" alt=""><figcaption></figcaption></figure>

When the webhook settings window appears, enter the Request Method and JSON values as shown below. In the URL input field, enter the <mark style="color:red;">**`Webhook URL`**</mark> you copied in the previous step.

<figure><img src="/files/cf09371b195c067301cb36bb0b4a523683242b48" alt=""><figcaption></figcaption></figure>

| Method | POST              |
| ------ | ----------------- |
| JSON   | See payload below |

{% code title="payload.json" %}

```json
{
  "text": "#taskkey is #status. <[https://www.listly.io/single?key=#taskkey&tab=4&card=30|See](https://www.listly.io/single?key=#taskkey&tab=4&card=30%7CSee) result>\nFrom Listly.",
  "icon_emoji": ":white_check_mark:"
}
```

{% endcode %}
{% endstep %}

{% step %}
Re-extract or use the scheduler to extract data for that task again, and you'll receive data extraction notification messages in Slack as shown below.

<figure><img src="/files/1c9ee3258a54d2f042fbf321000237dd4574464e" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Other Settings

* If you're familiar with JSON format, you can add <mark style="color:red;">**`channel: #channelname`**</mark> or <mark style="color:red;">**`user: @username`**</mark> to the JSON above to change which channel/user receives notifications. Adding <mark style="color:red;">**`username: botname`**</mark> lets you change the name of the bot sending notifications.
* To learn more about Slack Incoming Webhooks, check out Slack's documentation: <https://api.slack.com/legacy/custom-integrations/messaging/webhooks>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.listly.io/getting-started/result-page-features/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
