Slack Communication Module
Module Location: groclake.toollake.comm.slack
Overview
The Slack module in Toollake allows users to send messages to Slack channels using the Slack SDK. This is particularly useful for real-time notifications, team communication, and automated status updates.
Setup Requirements
To use the Slack module, ensure you have the following:
ā
Slack Bot Token (Set as an environment variable: SLACK_BOT_TOKEN
)
ā
Install required packages:
Class: Slack
The Slack
class provides an interface to send messages to Slack channels.
Method: send_message(payload)
Sends a message to a specified Slack channel.
Parameters
payload
dict
Dictionary containing message details
message
str
The text message to be sent
channel
str
The Slack channel where the message should be sent (e.g., #general
)
Returns
A dictionary with a success message or an error message in case of failure.
Example Usage
Last updated