- 概述
- 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 作用域
在 UiPath 和 Slack 之间建立经过身份验证的连接,以在自动化工作流中使用
UiPath.Slack.Activities.SlackScopeActivity
概述
SlackScope活动遵循OAuth 2.0协议,在 UiPath 和 Slack API 之间建立经过身份验证的连接。
在Slack 作用域活动建立连接之前,它需要获得代表您执行操作和访问您允许的数据的授权。要授予授权,您需要创建新的Slack 应用程序并将其安装到工作区(无需编码)。您无需通过 Slack 应用程序目录公开分发此应用程序,只需将其安装到要自动化的工作区中。
- 有关更多信息,请参阅《分发 Slack 应用程序文档》中的“单个工作区应用程序” 。
- 有关如何创建应用程序的分步说明,请参阅 设置 指南中的 创建 Slack 应用程序 。
创建应用程序时,您需要分配作用域(即权限),以定义应用程序(以及随后的活动)可以调用的 API 方法以及可以访问的信息。
- 有关如何添加作用域的分步说明,请参阅 设置 指南中的 添加应用程序权限 。
- 有关此活动包所需作用域的完整列表,请参阅 设置 指南中的 要添加的作用域 。
After registering the app, Slack assigns a unique Client ID (ClientID), Client Secret (ClientSecret), and OAuth Access Token (Token) that you enter in the Slack Scope activity to initiate a connection.
工作方式
以下步骤和消息序列图是活动从设计时(即活动依赖项和输入/输出属性)到运行时如何工作的示例。
-
完成设置步骤。
-
将“Slack 作用域”活动添加到项目中。
-
输入“身份验证 (有人值守)” 、 “身份验证 (无人值守)”属性的值。
在活动正文中
The Slack Scope activity has two different authentication models depending on the automation mode (unattended or attended).
There are two differences between unattended and attended automation as it pertains to Slack Scope activity: scope setting requirements and allowing access.
作用域设置要求
如果要运行 Attended 自动化,则不必使用应用程序的OAuth 和权限功能设置(可以)来设置作用域,而可以使用“作用域”属性(如下所述)来设置作用域。
To enable the best user experience when using the activities, it's recommended that you set the using the app's OAuth & Permissions feature settings (as described in the Setup guide). By setting the scopes ahead a time, you can freely switch between unattended and attended automation when you're building and running your project.
允许访问
When the Slack Scope activity runs during attended automation, a web page opens that prompts you to grant your app access to your selected scopes by clicking an Allow button.
在无人值守自动化期间,系统会在后台以静默方式向您的应用程序授予访问权限(无需用户执行任何操作)。
- ClientID - The unique ID assigned to your app by Slack. Enter a
Stringvalue.- 此属性仅接受客户端 ID 的
String值。 它不支持String变量。 - To find your Client ID, go to your created app's Basic Information page. Under App Credentials you'll see both your Client ID and Client Secret.
- 此属性仅接受客户端 ID 的
- ClientSecret - The unique ID associated with your ClientID. Enter a
Stringvalue.- 此属性仅接受客户端密码的
String值。 它不支持String变量。 - To find your Client Secret, go to your app's Basic Information page. Under App Credentials you'll see both your Client ID and Client Secret.
- 此属性仅接受客户端密码的
- Token - The app's OAuth Access Token to use for unattended automation only. Slack automatically generates this token when you install the app to your workspace. Enter a
Stringvalue. This property only accepts theStringvalue of your OAuth Access Token. It does not supportStringvariables.- To get your OAuth Access Token, you must first install the app to your workspace. After installing your app, go to your app's Installed App Settings page (image shown above).
- 有关更多信息,请参阅设置指南中的安装应用到工作区。
属性
身份验证
- Scopes - A categorized list of the scopes to grant (or previously granted when following the Setup guide) to the app. Select all the applicable scopes. There are 7 scopes: PublicChannels, PrivateChannels, DirectMessages, GroupMessages, Users, Chat, Files.
常见
- “显示名称”- 活动的显示名称。此字段仅支持
Strings或String变量。
其他
- “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。
- ReportApiErrorAsException - When selected, API error responses are reported in BusinessActivityExecutionException by all child activities that use this application scope. When cleared, the child activity populates the API error message in the ResponseStatus output property and workflow execution continues. Check the ResponseStatus property to confirm successful execution.
输出
- Connection - The connection which can be passed to a child application scope. This field supports only
Connectionvariables.
示例
下图显示了活动依赖关系和输入/输出属性值的示例。
有关分步说明和示例,请参阅快速入门指南。