- 概述
- Adobe Sign
- Alteryx
- Amazon Comprehend
- Amazon Connect
- Amazon Rekognition
- 亚马逊文本提取
- Box
- 认知
- DocuSign
- Google Vision
- Jira
- Marketo
- Microsoft Dynamics
- Microsoft Dynamics (Finance and Operations)
- Microsoft Teams
- Microsoft Translator
- Microsoft Vision
- Oracle 集成云
- Oracle NetSuite
- Salesforce
- SAP BAPI
- ServiceNow
- Slack
- Smartsheet
- SuccessFactors
- Tableau
- Twilio
- Workato
- Workday
传统“集成”活动
简介
要启用 Slack 活动,您必须在Slack 作用域活动中输入身份验证详细信息。这些身份验证详细信息使机器人能够代表您执行操作并访问您允许的数据。
要生成和授予身份验证详细信息,并开始构建自动化项目,请完成以下步骤:
After creating your app, Slack assigns it a unique Client ID, Client Secret (i.e. app credentials), and an OAuth Access Token (for unattended automation) that you'll enter in the Slack Scope activity's authentication properties.
步骤
Before using the Slack activities, follow the steps below to generate or collect the required input data for the Slack Scope activity.
1. 创建 Slack 应用程序
要使用 Slack 活动,您可以创建一个简单的单一工作区应用程序。以下步骤和示例假定您拥有现有工作区,并且是该工作区的成员。
-
登录到您的 Slack 工作区或打开 Slack 桌面应用程序。
- 如果您使用上面的 URL 登录,则需要工作区 Slack URL 。
-
转到您的 Apps ,然后单击“创建新应用程序”按钮。
-
Enter your App Name, select the Development Slack Workspace and click the Create App button.
After you create your app, you're taken to the Basic Information page. This is where you can find the Client ID and Client Secret that you'll need for attended automation authentication in the Slack Scope activity.
Before you copy and paste these into your activity, you should configure the OAuth & Permissions features by following the steps in the next section.
虽然在技术上可以,但我们不建议这样做,因为您需要与他们共享您的客户端密码。如果您有兴趣与团队成员共享应用程序,您可以使用 Unattended 自动化模式,因为它依赖可共享的 OAuth 访问令牌。
2. 添加应用程序权限
使用作用域向应用程序添加权限。作用域定义了此应用程序可以调用的 API 方法,以及该应用程序在安装该应用程序的工作区中可以访问的信息。许多作用域仅限于特定资源,例如频道或文件。
如果您仅计划运行有人值守的自动化,则不需要将作用域直接添加到应用程序。如果您运行 Attended 自动化,请使用Slack 作用域活动中的“作用域”属性选择作用域。由于在应用程序中设置作用域可同时启用 Unattended 和 Attended 自动化,因此我们建议您在开始使用活动包之前完成以下步骤;这使您可以在模式之间自由切换。
-
In the left-hand navigation, click the OAuth & Permissions.
-
In the Redirect URLs section, click the Add New Redirect URL button and enter your URL.
-
如果您不知道应输入的 URL,可以暂时将其留空。
-
When you try connecting to your app with the Slack Scope activity for the first time (using attended automation) the activity opens a new web page that displays an OAuth Error. This error includes the redirect URL (i.e., Passed URI) that your workspace is using. You can copy this URL and enter it as your Redirect URL .
-
-
在“作用域”部分中,添加要分配给应用程序的权限作用域,然后单击“保存更改”按钮(请参阅下一部分中要添加的作用域的完整列表)。
要添加的作用域
The following are the scopes required for the different Slack activities. Also included in the table is each scope's mapping to to the Scopes property values from the Slack Scope activity.
| 范围 | 活动 | “作用域”属性 |
|---|---|---|
| channels:write 修改公共频道 | 创建频道 邀请加入频道 加入频道 离开频道 从频道中删除 发送消息 | PublicChannels |
| 组:写入 修改您的私人频道 | 邀请加入频道 离开频道 从频道中删除 发送消息 | PrivateChannels |
| 我:写 修改用户的直接消息 | 邀请加入频道 离开频道 从频道中删除 发送消息 | DirectMessages |
| mpim:write 更改用户的群组消息 | 邀请加入频道 离开频道 从频道中删除 发送消息 | GroupMessages |
| 文件:写入:用户 以用户身份上传和修改文件 | 发送消息 | 文件 |
| 文件:读取 访问工作区的文件、注释和关联信息 | 下载文件 发送消息 | 文件 |
| channels:read 访问有关用户公共频道的信息 | 获取消息 | PublicChannels |
| 组:读取 访问有关用户私人频道的信息 | 获取消息 | PrivateChannels |
| im:read 访问有关用户直接消息的信息 | 获取消息 | DirectMessages |
| mpim:读取 访问有关用户的群组消息的信息 | 获取消息 | GroupMessages |
| channels:history 访问用户的公共频道 | 获取回复 | PublicChannels |
| 组:历史记录 访问用户私人频道中的内容 | 获取回复 | PrivateChannels |
| im:history 访问用户直接消息中的内容 | 获取回复 | DirectMessages |
| mpim:历史记录 访问用户的群组消息 | 获取回复 | GroupMessages |
| 聊天:写入:用户 以用户身份发送消息 | 回复 发送消息 | 聊天 |
| 搜索:已读 搜索工作区的内容 | 搜索 | (包含在 DirectMessage 和/或 GroupMessage 中) |
| users.profile: 写入 修改用户的个人资料 | 更新状态 | 用户 |
| 用户:read.email 查看工作区成员的电子邮件地址 | 邀请加入频道 从频道中删除 | 用户 |
| users:read 查看工作区的成员列表及其联系信息 | 邀请加入频道 从频道中删除 | 用户 |
选择作用域后,即可按照下一部分中的步骤将应用程序安装到工作区。
3. 将您的应用程序安装到工作区
根据工作区的管理方式,您可能需要请求安装应用程序。
-
In the OAuth Tokens & Redirects URLs section, click the Install App to Workspace button or Request to Install button.
-
After the app is installed, an OAuth Access Token is generated.
- Similar to the Client ID and Client Secret, the OAuth Access Token is used for authentication purposes. The differences between the two become applicable when run your automation project.
-
If running attended automation, the Slack Scope activity needs values in the Client ID, Client Secret, Scopes properites.
-
If running unattended automation, the Slack Scope activity only needs a value in the OAuth Access Token property.
-
- Similar to the Client ID and Client Secret, the OAuth Access Token is used for authentication purposes. The differences between the two become applicable when run your automation project.
4. 构建项目
- 创建一个新的自动化项目。
-
打开 UiPath Studio。
-
Under New Project, click Process (this opens a New Blank Process window).
-
Enter a project Name, Location, and Description.
-
单击“创建”。
-
- Install the UiPath.Slack.Activities package.
- In the Design ribbon, click Manage Packages (this opens the Manage Packages window).
- Under All Packages, click Go!
- In the Search bar, enter Slack.
- Click, install, and accept the license for the UiPath.Slack.Activities.
-
有关 Uipath Studio 包的更多信息,请参阅 Studio 指南中的管理包。
-
操作完毕!
现在您已完成设置,可以开始将 Slack 活动添加到项目中。
后续步骤
要亲身体验学习并快速开始使用活动,请参阅快速入门指南。这些指南提供分步说明,以帮助您创建不同活动的工作示例,以便您可以验证与 Slack 工作区的连接并熟悉输入/输出属性。
要了解有关 Slack 活动(包括示例属性输入/输出)的更多信息,请参阅活动页面以获取完整的活动列表以及活动详细信息页面的链接。