UiPath Documentation
marketplace
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Marketplace 用户指南

上次更新日期 2026年4月1日

获取消息

概述

The Get Messages activity calls the Microsoft Graph ListChatMessages or ListChannelMessages API to retrieve all messages from a specified chat (ChatId) or channel (ChannelId) and team (TeamID).

After performing the search, the activity outputs the properties in a ChatMessage[] object (Message) that you can use as input variables in subsequent activities (for example, ChatMessage(0).Id in Get Message Replies, Reply To Message, and so on).

工作方式

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

  1. 完成设置步骤。
  2. Add the Microsoft Teams Scope activity to your project.
  3. Complete one of the following two options (A or B):

A. Add an activity or run an external process that outputs a Chat.Id value (e.g., Get Chats).

B. Add an activity or run an external process that outputs a Team.Id value (for example, Get Teams) AND an activity or external process that outputs a Channel.Id value (for example, Get Channels).

  1. Add the Get Messages activity inside the Microsoft Teams Scope activity.
  2. Enter values for the Channel OR Chat properties.
  3. Create and enter a ChatMessage[] variable for your Output property.
  4. 运行活动。

属性

将此活动添加到 UiPath Studio 中的项目时,会指定以下属性的值。

文档图像

常见

显示名称

活动的显示名称。

属性详细信息
类型String
必填
默认值获取消息
允许的值输入 StringString 变量。
注意不适用

频道

团队 ID

包含要从中获取消息的频道的 Team 对象的 ID。

属性详细信息
类型String
必填Yes (if ChatId is empty)
默认值空白
允许的值输入 StringString 变量。
注意To get the Team.Id value, use an external process or activity that includes the Team.Id value in its output (for example, Get Teams or external API call) Either (ChatId) or (TeamId and ChannelId) are required.
频道 ID

要从中获取消息的 Channel 对象的 ID。

属性详细信息
类型String
必填Yes (if TeamId has a value)
默认值空白
允许的值输入 StringString 变量。
注意To get the Channel.Id value, use an external process or activity that includes the Channel.Id value in its output (for example, Get Channels or external API call) Either (ChatId) or (TeamId and ChannelId) are required.

聊天

ChatId

要从中获取消息的 Chat 对象的 ID。

属性详细信息
类型String
必填Yes (if TeamId and ChannelId are empty)
默认值空白
允许的值输入 StringString 变量。
注意To get the Chat.Id value, use an external process or activity that includes the Chat.Id value in its output (for example, Get Chats or external API call) Either (ChatId) or (TeamId and ChannelId) are required.

选项

上限

要检索的最近消息的最大数量。

属性详细信息
类型Int32
必填
默认值空白
允许的值输入 Int32Int32 变量。
注意不适用

其他

私有

如果已选择,变量和参数的值将不会在 Verbose 级进行记录。

属性详细信息
类型复选框
必填
默认值未选中
允许的值已选择或未选择
注意不适用

输出

消息

来自指定聊天或频道的消息数组( ChatMessage[] 对象)。

属性

详细信息

类型

ChatMessage[]

必填

否(如果您计划在后续活动中使用输出数据,则为必填项)

默认值

空白

允许的值

输入ChatMessage[]变量。

注意

  • The variable you create for this property can be used as an input variable in subsequent activities (e.g., ChatMessage(0).Id in Get Message Replies , Reply To Message , etc.).

    * When using this variable as an input property value, specify the item in the array that you want to use (e.g., myMessages(0) ).

  • The ChatMessage object includes multiple properties that you can use in other activities.The example image below shows some of the properties that you can return.
  • Note - some properties listed in the designer are not applicable to the ChatMessage object (e.g., ODatatType ). For a list of the applicable Team properties, visit the links above.

示例

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

For step-by-step instructions and examples, see the Quickstart guides.

文档图像

  • 概述
  • 工作方式
  • 属性
  • 常见
  • 频道
  • 聊天
  • 选项
  • 其他
  • 输出
  • 示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新