DiscordWebhookHook

Discord

This hook allows you to post messages to Discord using incoming webhooks. Takes a Discord connection ID with a default relative webhook endpoint. The default endpoint can be overridden using the webhook_endpoint parameter (https://discordapp.com/developers/docs/resources/webhook).

View on GitHub

Last Updated: Oct. 23, 2022

Access Instructions

Install the Discord provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

http_conn_idHttp connection ID with host as “https://discord.com/api/” and default webhook endpoint in the extra field in the form of {“webhook_endpoint”: “webhooks/{webhook.id}/{webhook.token}”}
webhook_endpointDiscord webhook endpoint in the form of “webhooks/{webhook.id}/{webhook.token}”
messageThe message you want to send to your Discord channel (max 2000 characters)
usernameOverride the default username of the webhook
avatar_urlOverride the default avatar of the webhook
ttsIs a text-to-speech message
proxyProxy to use to make the Discord webhook call

Documentation

This hook allows you to post messages to Discord using incoming webhooks. Takes a Discord connection ID with a default relative webhook endpoint. The default endpoint can be overridden using the webhook_endpoint parameter (https://discordapp.com/developers/docs/resources/webhook).

Each Discord webhook can be pre-configured to use a specific username and avatar_url. You can override these defaults in this hook.

Was this page helpful?