Activity Variable Copilot Studio Girish Uppal

Activity Variable in Copilot Studio

 

Activity Variable in Copilot Studio provides context about current conversation and interaction. Activity variable offer details about type of activity and message content.

Activity variable can be accessed in multiple ways. One of the method to access activity variable is shown below (by using message node)


Activity.Type >> message, event or invoke


Activity.From.Name >> name of user sending the message


Activity.Value >> additional data associated with activity


Activity.Attachments

outputs Table and it contains the file attachments provided by user


Activity.Channel

Outputs choice value and it contains channel ID of current conversation


Activity.ChannelData

outputs an object containing channel specific content


Activity.Name

provides name of the event


Activity.Text

provides most recent message text sent by user


Activity.Type

provides type of activity


Activity.Recipient.Id

provides incoming activity’s type property


Activity.Recipient.Name

provides display name for agent within the channel


 

Sample example based on Copilot Studio Test Agent response is shown below


 

The below output is displayed for an agent deployed in Microsoft 365 Copilot


The below output is displayed for an agent deployed in Microsoft Teams channel

System.Activity.Attachments outputs JSON content containing attached file

It outputs important information for file in tabular format namely Name, Value, Content Type and actual File Content

  • Table
  • Name
  • Value
  • Content Type
  • E.g. image/png
  • Content
  • Actual File content