SlackHook

Slack

Creates a Slack API Connection to be used for calls.

View on GitHub

Last Updated: Dec. 3, 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_conn_idSlack connection id that has Slack API 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 WebClient value will use.
base_urlA string representing the Slack API base URL. If not set than default WebClient BASE_URL will use (https://www.slack.com/api/).
proxyProxy to make the Slack API call.
retry_handlersList of handlers to customize retry logic in slack_sdk.WebClient.
token(deprecated) Slack API Token.

Documentation

Creates a Slack API Connection to be used for calls.

This class provide a thin wrapper around the slack_sdk.WebClient.

Warning

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

Takes both Slack API token directly and connection that has Slack API token. If both are supplied, Slack API token will be used. Also exposes the rest of slack.WebClient args.

param slack_conn_id

Slack connection id that has Slack API 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 WebClient value will use.

param base_url

A string representing the Slack API base URL. If not set than default WebClient BASE_URL will use (https://www.slack.com/api/).

param proxy

Proxy to make the Slack API call.

param retry_handlers

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

param token

(deprecated) Slack API Token.

Was this page helpful?