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
Name | Description |
---|---|
Input | |
Message | The body of text that you want to send as a message. String variables containing the text for the message. |
Channel Name | The name of the Slack channel to which you want to send the message. String variables containing the desired channel name. |
Conversation Type | Specifies the type of conversation you want to send messages to (e.g., Channel, Direct Message, Group Message). String variables containing the conversation type. |
User Name | The name of the user whose direct/group message you want to get messages from. String variables containing the user name. |
Misc | |
Display Name | Provides 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 | |
Delay | Specifies 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 | |
Result | Outputs 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:
- Drag and drop the "Send Message" activity onto the workflow.
- Configure the properties by specifying the conversation type (Channel, Direct Message, Group Message), channel name or user name, and the message text.
- Optionally, configure the delay.
- 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.