UiPath Documentation
maestro
latest
false
Maestro 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

等待消息

Wait for Message suspends until the user sends a message, then outputs the latest conversation context for downstream conversational nodes to consume.

操作

Waits until the user sends the next message on the conversation, then resumes with the latest conversation context — the chat history and user profile information — as its output.

Always place a Wait for Message node immediately after the conversation trigger to ensure the Flow is ready for the user's first message. You can loop back to it for follow-up turns, or add more Wait for Message nodes elsewhere in the Flow.

输入

字段描述
对话 IDThe ID of the conversation to wait on. Bind to the conversation trigger's output, for example $vars.conversationTrigger1.output.conversationId.
Exchange limitMaximum number of past exchanges (back-and-forth turns) to include in the returned conversation history. Determines how many past messages in the conversation history are returned.

输出

字段描述
conversationContextThe latest conversation context, including the message history.

The conversationContext contains the following fields:

字段描述
latestExchangeIdIdentifier of the most recent exchange (back-and-forth turn). Use as the Exchange ID input to Send Message when replying to the conversation.
messagesThe recent conversation history, including both the user's and Flow's messages. Exchange limit determines how many past exchanges to include.
userSettingsUser-level profile fields, configurable by the end-user on the channels.

用法示例

Reference the full conversation context in a downstream Conversational Agent node:

$vars.waitForMessage1.output.conversationContext
$vars.waitForMessage1.output.conversationContext

Reference the outputted latestExchangeId in a downstream Send Message node:

$vars.waitForMessage1.output.conversationContext.latestExchangeId
$vars.waitForMessage1.output.conversationContext.latestExchangeId

Handling multiple Wait for Message nodes

When you have multiple Wait for Message nodes, you might accidentally configure a downstream node to reference a stale conversation context from a Wait for Message node that executed earlier.

For easier tracking, create a Flow-level variable (for example, $vars.globalConversationContext), and update it from each Wait for Message node's Update Variable section. Downstream nodes can then reference that single source of truth instead of needing to pick the last-executed Wait for Message node's output.

  • 操作
  • 输入
  • 输出
  • 用法示例
  • Handling multiple Wait for Message nodes
  • 相关页面

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新