SlackWebhookHook

Slack

This class provide a thin wrapper around the slack_sdk.WebhookClient. This hook allows you to post messages to Slack by using Incoming Webhooks.

View on GitHub

Last Updated: Nov. 14, 2022

Access Instructions

Install the Slack provider package into your Airflow environment.

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

Parameters

slack_webhook_conn_idSlack Incoming Webhook connection id that has Incoming Webhook token in the password field.
timeoutThe maximum number of seconds the client will wait to connect and receive a response from Slack. If not set than default WebhookClient value will use.
proxyProxy to make the Slack Incoming Webhook call.
retry_handlersList of handlers to customize retry logic in slack_sdk.WebhookClient.
webhook_token(deprecated) Slack Incoming Webhook token. Use instead Slack Incoming Webhook connection password field.

Documentation

This class provide a thin wrapper around the slack_sdk.WebhookClient. This hook allows you to post messages to Slack by using Incoming Webhooks.

Note

You cannot override the default channel (chosen by the user who installed your app), username, or icon when you’re using Incoming Webhooks to post messages. Instead, these values will always inherit from the associated Slack App configuration (link). It is possible to change this values only in Legacy Slack Integration Incoming Webhook.

Warning

This hook intend to use Slack Incoming Webhook connection and might not work correctly with Slack API connection.

param slack_webhook_conn_id

Slack Incoming Webhook connection id that has Incoming Webhook token in the password field.

param timeout

The maximum number of seconds the client will wait to connect and receive a response from Slack. If not set than default WebhookClient value will use.

param proxy

Proxy to make the Slack Incoming Webhook call.

param retry_handlers

List of handlers to customize retry logic in slack_sdk.WebhookClient.

param webhook_token

(deprecated) Slack Incoming Webhook token. Use instead Slack Incoming Webhook connection password field.

Was this page helpful?