Send Message
UiPath.Slack.Activities.Messages.SendMessage
Overview
The Send Message activity uses the Slack chat.postMessage API (among others) to send a message (Text) to a specific channel or direct/group message (Conversation).
A Conversation can be one of the following:
- A channel
- A direct message to an individual
- A group direct message to multiple individuals
After sending the reply, the activity returns its properties in Message object (Message) that you can use as input property variables in subsequent activities (e.g. Get Replies, Message.Text in , etc.).
How it works
The following steps are an example how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.
- Complete the Setup steps.
- Add the Slack Scope activity to your project.
- Add the Send Message activity inside the Slack Scope activity.
- Enter values for the Input properties.
- Create and enter a
Messagevariable for your Output property. - Run the activity.
In the Body of the Activity
- Conversation Type - The type of conversation you want to get messages from. There are three available options: Channel, Direct Message, Group Message.
- Channel Name - The name of the channel to get messages from.
StringorStringvariable - Channel ID - The ID of the channel to get messages from.
StringorStringvariable. - Text - The body of text that you want to send in your message. Enter a
StringorStringvariable. Either the File or Text property is required. You can enter values in both properties. - As User - Send this reply as user or bot. Defaults to true (send as user). Enter a
BooleanorBooleanvariable. Defaults to true if not specified. - File - The path to a local file that you want to attach in your reply. Enter a
StringorStringvariable. Either the File or Text property is required. You can enter values in both properties. - Message - Your sent message returned as a
Messageobject. Enter aMessagevariable. If you plan to use the activity to process the array output, select UiPath.Slack.Models.Message as the TypeArgument. - User - The name of the user who's DM you want to get messages from. Enter a
StringorStringvariable. - Conversation Name - The name of the Group Direct Message you want to get messages from. This field supports only
StringsorStringvariables. Direct messages between one or more users take the form of "mpdm-Person1--Person2--Person3-1".
Properties
Common
- DisplayName - The display name of the activity. This field supports only
StringsorStringvariables.
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Output
- ResponseStatus - The status of the request (success/failure information). Enter a
ResponseStatusvariable (UiPath.BAF.Models.ResponseStatus). TheResponseStatusobject includes three properties that you can use in other activities.- Success -
Boolean- Specifies whether the API request was successful. - ErrorCode -
String- The response error if the API request is unsuccessful (Success=False). - Message -
String- The error message.
- Success -