# Send Message

> `UiPath.Slack.Activities.Messages.SendMessage`

`UiPath.Slack.Activities.Messages.SendMessage`

## Overview

The **Send Message** activity uses the Slack [chat.postMessage](https://api.slack.com/methods/chat.postMessage) API (among [others](https://docs.uipath.com/activities/other/latest/legacy-integrations/slack-technical-references)) to send a message (**Text**) to a specific channel or direct/group message (**Conversation**).

A Conversation can be one of the following:

1. A channel
2. A direct message to an individual
3. 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](https://docs.uipath.com/activities/other/latest/legacy-integrations/slack-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.

1. Complete the [Setup](https://docs.uipath.com/activities/other/latest/legacy-integrations/slack-setup) steps.
2. Add the [Slack Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/slack-scope) activity to your project.
3. Add the **Send Message** activity inside the **Slack Scope** activity.
4. Enter values for the [Input](https://docs.uipath.com/activities/other/latest/legacy-integrations/slack-send-message#send-message) properties.
5. Create and enter a `Message` variable for your [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/slack-send-message#send-message) property.
6. 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. `String` or `String` variable
* **Channel ID** - The ID of the channel to get messages from. `String` or `String` variable.
* **Text** - The body of text that you want to send in your message. Enter a `String` or `String` variable. 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 `Boolean` or `Boolean` variable. Defaults to true if not specified.
* **File** - The path to a local file that you want to attach in your reply. Enter a `String` or `String` variable. Either the **File** or **Text** property is required. You can enter values in both properties.
* **Message** - Your sent message returned as a `Message` object. Enter a `Message` variable. 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 `String` or `String` variable.
* **Conversation Name** - The name of the Group Direct Message you want to get messages from. This field supports only `Strings` or `String` variables. 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 `Strings` or `String` variables.

### 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 `ResponseStatus` variable (*UiPath.BAF.Models.ResponseStatus*). The `ResponseStatus` object 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.
