Description
The Slack Files Upload Action Component allows you to post messages and files to a Slack channel specified in the component's properties using the Slack API. It is useful for debugging actions and notifying people. It can also be used to send messages to #channels and @people.

Output Payload | Description |
---|---|
cv.Payload | Outputs the previous component's output payload as-is (pass-through) |
Component Properties
Property Name | Description |
---|---|
File Name | Specify the file to send along with the message. For how to specify the file name, refer to File Path Handling |
Title | Specify the title of the file |
Channel | Specify the Slack channel. You can specify #channels @people and the channel ID |
Comment | Specify the message text you want to send |
Timeout | Specify the message send timeout duration |
Token | Specify the User OAuth Token set in Slack |
How to Set Up the Slack API
Create a new app from the Slack API site.

Specify this User OAuth Token in the Token property of the component.
Select OAuth & Permissions from the Features menu.

Add the required scopes to Scopes.
If you are sending files, chat:write:bot
and files:write:bot
are essential.
If you are specifying #channels
or @people
in a Slack channel, also add channels:read
, groups:read
, im:read
, and users:read
.
Once added, the Install App to Workspace button will become clickable at OAuth Tokens & Redirect URLs, allowing you to install the app (grant permissions). Once granted, the OAuth Access Token token will become available for use.