Overview
The Search activity uses the Slack search.all API to find the messages and files that match your search parameters (Query). The search parameters follow the same modifiers that you use when searching in the Slack application (e.g., "in:#channel-name, in:@user.name, keyword"). For more information, see Search in Slack in the Slack help documentation.
After performing the search, the activity returns the matching Message
objects (FirstMessage and Messages) and SlackFile
(FirstFile and Files) objects that you can use as input variables in subsequent activities (e.g., Download File).
How it Works
The following steps and message sequence diagram is an example of 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 Search activity inside the Slack Scope activity.
- Enter values for the Input properties.
- Create and enter the following variables for your Output properties.
SlackFile
andSlackFile[]
Message
andMessage[]
- Run the activity.
- Your input property values are sent to the search.all API.
- The API returns the
SlackFile
,SlackFile[]
,Message
, andMessage[]
values to your output property variables.


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 |
|
Required | Yes |
Default value | Search |
Allowed values | Enter a |
Notes | N/A |
Input
Query
Your search parameters (e.g., channel, user, keywords).
Attributes | Details |
---|---|
Type |
|
Required | Yes |
Default value | Empty |
Allowed values | Enter a |
Notes | Enter your query using the same search modifiers that you use in the Slack application (e.g., "in:#slack_quickstart New hires" would search for "New hires" (in messages and files) |
Misc
Private
If selected, the values of variables and arguments are no longer logged at Verbose level.
Attributes | Details |
---|---|
Type | Checkbox |
Required | No |
Default value | Not Selected |
Allowed values | Selected or Not Selected |
Notes | N/A |
Options
MaxResults
The maximum number of results that you want to be returned in the Message
and SlackFile
arrays.
Attributes | Details |
---|---|
Type |
|
Required | No |
Default value | 20 (not displayed) |
Allowed values | Enter a |
Notes | N/A |
SortBy
Specifies how you want the results sorted when they're returned.
Attributes | Details |
---|---|
Type |
|
Required | N/A (default selection) |
Default value | Relevance |
Allowed values | Select from three options: |
Notes | The three options are sorted accordingly:
|
Output
Files
The files that contain content matching your Query value.
Attributes | Details |
---|---|
Type |
UiPath.Slack.Models.SlackFile |
Required | No (recommended if you plan to use the output data in subsequent activities) |
Default value | Empty |
Allowed values | Enter a |
Notes | If no files are found, an empty array is returned. |
FirstFile
The first file found (according to your SortBy value) that contains content matching your Query value.
Attributes | Details |
---|---|
Type |
UiPath.Slack.Models.SlackFile |
Required | No (recommended if you plan to use the output data in subsequent activities) |
Default value | Empty |
Allowed values | Enter a |
Notes | If no file is found, a null value is returned. |
FirstMessage
The first message found (according to your SortBy value) that contains content matching your Query value.
Attributes | Details |
---|---|
Type |
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 |
Notes | If no message is found, a null value is returned. |
Messages
The messages that contain content matching your Query value.
Attributes | Details |
---|---|
Type |
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 |
Notes | If no messages are found, an empty array is returned. |
Example
The following image shows an example of the activity dependency relationship and input/output property values.
For step-by-step instructions and examples, see the Quickstart guides.


Updated 2 months ago