- 发行说明
- 概述
- 入门指南
- UiPath 市场供应商
- UiPath Marketplace 客户
- 发布准则
- 即用型自动化发布准则
- 解决方案加速器发布准则
- Integration Service 连接器的发布准则
- Process Mining 应用程序模板发布准则
- 安全性与 IP 保护
- 其他 UiPath 列表
- 连接器
- 如何创建活动
- 构建集成

Marketplace 用户指南
获取消息
概述
The Get Message activity calls the Microsoft Graph GetChannelMessage or GetChatMessage API to retrieve a specified message (MessageId) from a chat (ChatId) or channel (ChannelId) and team (TeamID).
After performing the search, the activity outputs its properties in a ChatMessage object (Message) that you can use as input variables in subsequent activities (for example, ChatMessage.Id in Get Message Replies, Reply To Message, and so on).
The difference between this activity and the Get Messages activity is the requirement to input of a specific message (MessageId). Inputting the MessageId enables you to retrieve a specific ChatMessage object instead of an array of objects that gets returned in the Get Messages activity.
工作方式
以下步骤和消息序列图是活动从设计时(即活动依赖项和输入/输出属性)到运行时如何工作的示例。
- 完成设置步骤。
- Add the Microsoft Teams Scope activity to your project.
- 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).
- Add the Get Message activity inside the Microsoft Teams Scope activity.
- Enter values for the Channel OR Chat and Input properties.
- Create and enter a
ChatMessagevariable for your Output property. - 运行活动。
-
Your input property values are sent to the GetChannelMessage or GetChatMessage API.
-
API 会将
ChatMessage值返回到您的输出属性变量。
-
属性
将此活动添加到 UiPath Studio 中的项目时,会指定以下属性的值。

常见
显示名称
活动的显示名称。
| 属性 | 详细信息 |
|---|---|
| 类型 | String |
| 必填 | 是 |
| 默认值 | 获取消息 |
| 允许的值 | 输入 String 或 String 变量。 |
| 注意 | 不适用 |
频道
团队 ID
包含要从中获取消息的频道的 Team 对象的 ID。
| 属性 | 详细信息 |
|---|---|
| 类型 | String |
| 必填 | Yes (if ChatId is empty) |
| 默认值 | 空白 |
| 允许的值 | 输入 String 或 String 变量。 |
| 注意 | 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) |
| 默认值 | 空白 |
| 允许的值 | 输入 String 或 String 变量。 |
| 注意 | 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) |
| 默认值 | 空白 |
| 允许的值 | 输入 String 或 String 变量。 |
| 注意 | 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. |
输入
消息 ID
要检索的消息的 ID。
| 属性 | 详细信息 |
|---|---|
| 类型 | String |
| 必填 | 是 |
| 默认值 | 空白 |
| 允许的值 | 输入 String 或 String 变量。 |
| 注意 | To get the Message.Id value, use an external process or activity that includes the Message.Id value in its output (for example, Get Messages or external API call). |
其他
私有
如果已选择,变量和参数的值将不会在 Verbose 级进行记录。
| 属性 | 详细信息 |
|---|---|
| 类型 | 复选框 |
| 必填 | 否 |
| 默认值 | 未选中 |
| 允许的值 | 已选择或未选择 |
| 注意 | 不适用 |
输出
消息
The ChatMessage object that represents the message specified in the MessageId property.
| 属性 | 详细信息 |
|---|---|
| 类型 |
|
| 必填 | 否(如果您计划在后续活动中使用输出数据,则为必填项) |
| 默认值 | 空白 |
| 允许的值 | 输入ChatMessage变量。 |
| 注意 |
|
示例
下图显示了活动依赖关系和输入/输出属性值的示例。
For step-by-step instructions and examples, see the Quickstart guides.
