UiPath Documentation
activities
latest
false
传统“集成”活动
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

Slack 作用域

在 UiPath 和 Slack 之间建立经过身份验证的连接,以在自动化工作流中使用

UiPath.Slack.Activities.SlackScopeActivity

概述​

SlackScope活动遵循OAuth 2.0协议,在 UiPath 和 Slack API 之间建立经过身份验证的连接。

在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.

工作方式​

以下步骤和消息序列图是活动从设计时(即活动依赖项和输入/输出属性)到运行时如何工作的示例。

  1. 完成设置步骤。

  2. 将“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.

作用域设置要求​

如 设置 指南的“添加应用程序权限” 部分所述,如果您计划运行 Unattended 自动化,则必须使用应用程序的 OAuth 和权限 功能设置来设置作用域。

如果要运行 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 String value.
    • 此属性仅接受客户端 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.
  • ClientSecret - The unique ID associated with your ClientID. Enter a String value.
    • 此属性仅接受客户端密码的 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 String value. This property only accepts the String value of your OAuth Access Token. It does not support String variables.
    • 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 Connection variables.

示例​

下图显示了活动依赖关系和输入/输出属性值的示例。

有关分步说明和示例,请参阅快速入门指南。

  • 概述​
  • 工作方式​
  • 在活动正文中​
  • 作用域设置要求​
  • 允许访问​
  • 属性​
  • 身份验证​
  • 常见​
  • 其他​
  • 输出​
  • 示例​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新