Task Messaging - Slack - Send Message
The Slack - Send message Task posts a message to a Slack channel or user, and can upload files with it, using a Slack Connection.

This Task uses a Slack Connection; see Connection - Slack. The Task does not use the proxy set on the Connection.
The Main settings, Flow, On error, Conditions and TimeOut tabs are the same for every Task; see Job - Tasks.
The Slack - Send message Task is part of the Advanced messaging feature of the license.
Slack - Send message: Main settings tab
-
Connection: the Slack Connection to post with. Required
-
To channel and To user: in the Channel name group, whether the message goes to a channel or to a user
To channel is selected on a new Task. Switching between the two clears Channel name.
-
Channel name: the box under To user; with To channel, the channel to post to
Required. A value that starts with "#", as in
#<channel name>, is looked up by name among the first 200 public and private channels that the Connection can see. Any other value is passed to Slack as it is, for example a channel ID. The refresh button next to the field fills the list. With To channel, it lists the public channels as#<channel name>, followed by the private channels without "#". A private channel chosen from the list is therefore passed to Slack as it is, and is not looked up by name; type "#" in front of the name to have it looked up. With To user, it lists the user names that have a direct message conversation with the Connection.The lookup of a private channel by name needs the "groups:read" scope on the Slack app; see Connection - Slack.
With To user, the Task does not use Channel name, but the Task window still requires a value.
-
Send as user: with To user, the Slack user name of the person who receives the message; with To channel, the user name sent to Slack for the post
The refresh button next to the field lists the users of the workspace.
-
Message: the text to post. Required
-
Send only first file and Send one message per file (default): when the File filter tab matches files, upload only the first matching file, or every matching file, each with Message
Variables are resolved in Channel name, Send as user and Message.
Slack - Send message: File filter tab
Use the File Filter to choose files to upload with the message. Without a source folder on this tab, the message is posted as text only. The Credential of the File filter is used to read the files.
Output and errors
The output of the Task is "Success" for a message, and <file name> sucessfully uploaded for each uploaded file.
If Slack rejects the message or a file, or the channel or user cannot be found, the error is written to standard error, and the Task reports success.