Send Slack v2
"Send Slack v2" is a task that lets you send a message to Slack using Slack's new API, you can even send a file.
App token
You must enter your app's workspace token.
Channel name
You must enter the name of the channel you want to send the message to. The app needs to be invited to the channel for it to be able to use the channel.
Fallback
Plaintext message displayed to users using an interface that does not support attachments or interactive messages.
Pretext
This is optional text that appears above the message attachment block.
Title
A short, user-facing string to label this option to users. Shown as a bold heading above the value text, it cannot contain markup.
Text
Text that appears inside the message attachment block.
File path
If you want to send a file to slack you must enter the file path of the file you want to send, it needs to be a local path.
Comment
A message displayed along the file.
Panels
In addition, you can choose items that may or may not appear on the workflow report by using checkbox options.
More Fields
You can add fields by pressing the add button and enter the value of the field you want to send.
Creating the app to send messages to slack
Go to your apps then click the Create New App
button, then select From an app manifest
.
Now select your workspace, then click Next
and copy paste this YAML into the YAML textbox :
display_information:
name: Embrace bot
description: Slack app for Automate-it/Pulse-IT chat integration.
background_color: "#555759"
features:
bot_user:
display_name: Send Slack v2
always_online: false
oauth_config:
scopes:
bot:
- channels:read
- chat:write
- chat:write.public
- files:write
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
Then click Next
and Create
.
Install the App and get the App Token
Now you need to install the app into your workspace. Depending on whether you are an admin of the workspace you might need to create a request to install the app before actually installing it.
When you are authorized (or if you already were) click Install to Workspace
and then Allow
.
Now go to OAuth & Permissions
in the sidebar and copy the Bot User OAuth Token, you will need it for the task.