Skip to main content

Send Message

AutomatR.Slack.Activities.SendMessage

The "Send Message" activity in AutomatR is part of the Slack Messages activities package, utilizing the Slack API to send messages to specific channels or direct/group messages. This activity is designed for scenarios where you need to programmatically send messages to Slack channels or direct/group messages.

Properties

NameDescription
Input
MessageThe body of text that you want to send as a message. String variables containing the text for the message.
Channel NameThe name of the Slack channel to which you want to send the message. String variables containing the desired channel name.
Conversation TypeSpecifies the type of conversation you want to send messages to (e.g., Channel, Direct Message, Group Message). String variables containing the conversation type.
User NameThe name of the user whose direct/group message you want to get messages from. String variables containing the user name.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Send Message" activity. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultOutputs a Boolean value indicating whether the message sending operation was successful. True indicates success, while False indicates failure. Variables of relevant types (e.g., Boolean variables) to store the operation result.

How to use:

  1. Drag and drop the "Send Message" activity onto the workflow.
  2. Configure the properties by specifying the conversation type (Channel, Direct Message, Group Message), channel name or user name, and the message text.
  3. Optionally, configure the delay.
  4. Execute the workflow to send the specified message to the Slack channel or user.

Example: Consider an example where the "Send Message" activity is used to send a message to a Slack channel named "general":

Send Message:
Delay: 2
Conversation Type: "Channel"
Channel Name: "general"
Message: "Hello, this is a sample message."
Result: messageResult

In this example, the activity sends the specified message to the "general" channel with a 2-second delay. The result of the operation (success or failure) is stored in the Boolean variable "messageResult" for further handling in the workflow.