Sending event activities

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

Microsoft Copilot Studio provides two nodes that allow you to send non-message activities: Send an Event, and Send an Activity. These node types are discussed in the following sections.

Screenshot of adding an Advanced node, including the Send an event and Send an activity options.

Sending events

The Send an Event node is designed for sending Event activities. Event activities are sent from the copilot and can be intercepted and used by the channel, which decides if and how to use the activities. When you send an event, you give it a name and then you can set a value on the event. This value can be in any format: a primitive literal value, a variable reference, or a Power Fx formula. The value gets serialized as JSON and added to the outgoing activity.

Screenshot showing the settings menu for an Event activity node.

Uses of this node include:

  • You can configure a custom web chat control to handle events sent from the copilot. For example, you could look for an event coming back from the copilot and take an action on the page. The 04.api/c.incoming-activity-event sample in the Microsoft Bot Framework Web Chat samples repository on GitHub demonstrates how event handling could work.
  • AudioCodes use event activities to let you control the service. For example, starting or stopping call recording. For additional information, see Recording calls.

Sending other activity types

In addition to event activities, you can send activities of other types using the send activity node. Generally, the usage of this node is advanced – hence it being in the advanced subcategory. The types of activities you can send are a subset of the ones offered in the Bot Framework Schema - ActivityTypes Class. When using this node, you choose the type of the activity and then optionally set a name or value.

Common types are:

  • Typing – Sends a typing activity, which the channel can choose to pick up and show a typing indicator on the client.
  • Delay – Can be used to provide a delay between messages. For example: sending a message, then sending a delay activity, followed by another message. For the end user, they see the first message, followed by a pause, then the second message. In this case, "Value" is set to the number of milliseconds delay. For details, see ActivityTypes.Delay Field.
  • Invoke/Invoke Response – Generally used for Microsoft Teams. A user creates a topic with an Invoke trigger to intercept an incoming Invoke from Teams, and use an Invoke Response activity to send an appropriate response back to Teams.
  • Handoff – Allows a user to send a Handoff activity with explicit control over the value. A handoff is used for some external channels, such as AudioCodes.

Screenshot showing the Invoke activity node with the Type dropdown list.