Subscribe

UiPath Activities

The UiPath Activities Guide

Get Messages

Overview

The Get Messages activity uses the Slack conversations.list and conversations.history APIs to retrieve the most recent messages from a specified conversation (Conversation).

After retrieving the messages, the activity returns the properties in a Message[] object (Messages) that you can use as input property variables in subsequent activities (e.g., Message(0).Files in Download File, etc.).

How it works

The following steps and message sequence diagram is 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 steps.
  2. Add the Slack Scope activity to your project.
  3. Add the Get Messages activity inside the Slack Scope activity.
  4. Enter values for the Input properties.
  5. Create and enter a Message[] variable for your Output property.
  6. Run the activity.

Properties

The values for the following properties are specified when adding this activity to your project in UiPath Studio.

Common

DisplayName

The display name of the activity.

Attributes

Details

Type

String

Required

Yes

Default value

Get Messages

Allowed values

Enter a String or String variable.

Notes

N/A


Input

Conversation Type

The type of conversation you want to get messages from

Attributes

Details

Type

enum

Required

Yes

Default value

Channel

Allowed values

Channel, Direct Message, Group Message

Notes

N/A

Channel Name

The name of the channel to get messages from.

Attributes

Details

Type

String

Required

Yes, if (Conversation Type) is Channel and Channel ID is not supplied.

Default value

Empty

Allowed values

String or String variable

Notes

N/A

Channel ID

The ID of the channel to get messages from.

Attributes

Details

Type

String

Required

Yes, if (Conversation Type) is Channel and Channel Name is not supplied.

Default value

Empty

Allowed values

String or String variable

Notes

N/A

User Name

The name of the user who's DM you want to get messages from.

Attributes

Details

Type

String

Required

Yes, if (Conversation Type) is Direct Message

Default value

Empty

Allowed values

String or String variable

Notes

N/A

Conversation ID

The ID of the Group Direct Message you want to get messages from

Attributes

Details

Type

String

Required

Yes, if (Conversation Type) is Group Message

Default value

Empty

Allowed values

String or String variable

Notes

Direct messages between one or more users take the form of "mpdm-Person1--Person2--Person3-1".


Options

MarkAsRead

Specifies whether you want to mark the retrieved messages as read in your workspace.

Attributes

Details

Type

Checkbox

Required

No

Default value

Not Selected

Allowed values

Selected or Not Selected

Notes

When selected, all messages that are returned in the Message array (Messages) are marked as read in your Slack workspace.


MaxResults

The maximum number of messages that you want returned in the Message array.

Attributes

Details

Type

Int32

Required

No

Default value

100 (not displayed)

Allowed values

Enter a Int32 or Int32 variable.

Notes

N/A


Output

Messages

The messages found based on your specified Conversation.

Attributes

Details

Type

Message[]

UiPath.Slack.Models.Message

Required

No (recommended if you plan to use the output data in subsequent activities)

Default value

Empty

Allowed values

Enter a Message[] variable.

Notes

If you plan to use the For Each activity to process the array output, select UiPath.Slack.Models.Message as the TypeArgument (see example image below).

Updated 27 days ago


Get Messages


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.