UiPath Marketplace

The UiPath Marketplace Guide

Welcome to UiPath Marketplace Documentation. You will find comprehensive information to help you better understand and use the automations from our platform.

In order to download the solutions described here, please visit the official UiPath Marketplace here.

Please note that only solutions built and supported by UiPath are detailed in the present guide.

Quickstart - Channels and Messages

Overview

The purpose of this guide is to help you create a working sample with different Slack activities, including Create Channel, Invite to Channel, Send Message, and Get Messages.

This working sample enables you to quickly verify the connection to your Slack workspace and get familiar with the included activity's input/output datatypes.

After completing the steps in this guide, you'll have an automation sequence that does the following:

  1. Establishes a connection to your Slack workspace (Slack Scope).
  2. Creates a new channel in your Slack workspace (Create Channel).
  3. Invites a user to your new channel (Invite to Channel).
  4. Sends a message to the channel (Send Message).
  5. Verifies the results of the Create Channel, Invite to Channel, and Send Message activities by outputting the channel's messages and user information (Get Messages, For Each, and Write Line).
Quickstart message sequence diagram (how it works)

Quickstart message sequence diagram (how it works)

Prerequisites

Before you begin:

  1. Complete the Slack Setup steps.

Steps

Build your project

  1. Add the Slack Scope activity to your project.
    1. Enter the ClientID for your Slack app.
    2. Enter the ClientSecret for your Slack app.
      • For more information about the Client ID and Client Secret, see Create new Slack app in the Setup guide.
    3. From the Scopes drop-down list, select all of the listed scopes.
    4. Click the Connect button in the Design Panel.
  2. Add the Create Channel activity after the Slack Scope activity.
    1. Create and enter a String variable for your Channel Name (e.g, channelName with default value _"slackquickstart").
    2. Create and enter a String variable for the ChannelID (e.g., newChannel)
      • For more information about the allowed name values, see Channel Name in the Create Channel activity details page.
  3. Add the Invite to Channel activity after the Create Channel activity.
    1. In the Channel property, enter the String variable you created for the ChannelID property in the Create Channel activity (e.g., newChannel).
    2. Enter a Slack user that you want to invite to the channel using the Slack's username syntax (e.g.,"Jean.Grey").
      • You must enter a user that belongs to the workspace that you're Slack Scope is connected to.
  4. Add the Send Message activity after the Invite to Channel activity.
    1. In the Conversation property, enter the String variable you created for the ChannelID property in the Create Channel activity (e.g., newChannel).
    2. Create and enter a String variable for the Text property (e.g., messageText with default value "Welcome to "+channelName).
      • While it's good practice to create and enter a Message variable for the Message output property, for this example you'll not need to because it is not applicable when you verify the activity results.

Test your project

  1. To verify that your new channel was created, the users invited, and the message was sent successfully, add the Get Messages activity after the Send Message activity.
    1. In the Conversation property, enter the String variable you created for the ChannelID property in the Create Channel activity (e.g., newChannel).
    2. Create and enter a Message[] variable for the Messages output property (e.g., slackMessages).
      • When creating your variable, select UiPath.Slack.Models.Message[] as your variable type.
  2. To process and see the output of your sent message, after the Get Messages activity, add the For Each activity with the If and Write Line activities.
    1. In the TypeArgument property, select UiPath.Slack.Models.Message.
    2. In the Values property, enter the Message[] variable you created for the Messages output property in the Get Messages activity (e.g., slackMessages).
    3. For the If activity Condition statement, enter the following parameters to narrow down the Get Messages output to the message you sent with the Send Message activity: item.Text.Equals(messageText).
    4. In the Then statement box, add the Write Line activity.
      1. For the Text property, enter item.User+" : "+item.Text to output the message text and your user ID for verification in the output window.
    5. In the Else statement box, add another Write Line activity.
      1. For the Text property, enter item.User+" : "+item.Text to see all the user IDs that "joined" from the Invite to Channel activity.
  3. Click Start and verify the results in the output window.

You're done!

When you're ready, try the other Quickstart guides to get more familiar with the different Slack activities.

To learn more about the Slack activities (including example property inputs/outputs), see the Activities page for a complete activity list and links to the activity detail pages.

Updated 7 months ago


Quickstart - Channels and Messages


Suggested Edits are limited on API Reference Pages

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