GetWebhook

The GetWebhook action retrieves information about a specific webhook. It returns a webhook object containing fields such as url. If no matching webhook is found, it returns an empty/falsy value.

GetWebhook(
    webhookIdn: str,
    webhookType: str
)

Where:

  • webhookIdn: The unique identifier of the webhook.
  • webhookType: The type of webhook. Either "incoming" (receives data from external sources) or "outgoing" (sends data to external URLs).

Example

{% set webhook = GetWebhook(webhookIdn="my_webhook", webhookType="incoming") %}

{% if webhook %}
    {{SendMessage(message=webhook.url)}}
{% else %}
    {{SendMessage(message="Webhook not found.")}}
{% endif %}

The above code snippet retrieves the incoming webhook named "my_webhook" and sends its URL to the chat, or notifies that the webhook was not found.