web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Is it possible to send...
Copilot Studio
Unanswered

Is it possible to send and receive events within copilot studio

(0) ShareShare
ReportReport
Posted on by 78

Hi Team ,

 

Is it possible to send and receive events within copilot studio?

I would like to achieve a requirement using this.  I don't want to trigger these events from outside of copilot.
I tried, but not able to receive that event sent from some topic within "event received trigger"

Event trigger topic: 

argeraju_0-1704451264555.png

 

Event received trigger:

argeraju_1-1704451304855.png

 

Categories:
I have the same question (0)
  • Verified answer
    HenryJammes Profile Picture
    on at

    Hi @argeraju 

     

    You can trigger topics using the event trigger. This is typically done from the client, using the Direct Line API.

    For example, if you want to enter a specific topic directly from an API call (and not by a trigger phrase), one thing you can do is change the topic trigger to Event Received.

     

    In the below example, I trigger my topic when I receive a “lesson1” event, and then redirect the conversation to the standard “Lesson 1” topic (that can also be triggered with trigger phrases):

     

    HenryJammes_0-1704451399654.png

     

     

    From an API standpoint, I simply send an event activity to the Direct Line API: https://directline.botframework.com/v3/directline/conversations/{{ConversationId}}/activities

     

    {
     "type": "event",
     "name": "lesson1"
    }

     

  • manianna Profile Picture
    6 on at

    I have a similar question on receiving the event. I am sending the custom event from  client webchat like below but how do i read the value in Copilot studio ?

    store.dispatch( {
    type: 'WEB_CHAT/SEND_EVENT',
    payload:
    {
    name: 'EVENT_GET_POSITION',
    value: { latitude: '12345', longitude: '09886', text:'I am new here' }
    }
    } );

  • drlreinhard7 Profile Picture
    Microsoft Employee on at

    Hi @argeraju , did you get this working? 
    I try something similar but have problems to get a proper response. 

  • adilei Profile Picture
    on at

    Here is an example that parses a value passed by an event call. The value is assigned to System.Activity.Value.

     

    kind: AdaptiveDialog
    beginDialog:
     kind: OnEventActivity
     id: main
     eventName: myEvent
     actions:
     - kind: SetVariable
     id: setVariable_ZaaEfM
     variable: Topic.myValue
     value: =Text(System.Activity.Value)
  • CHY Profile Picture
    3 on at

    Thank you for sharing this lead. I managed to retrieve the value passed by an event call. I'd like to highlight that it might result in an error if you only assign a value to Text(System.Activity.Value). Instead, you should specify the variable name.

    	 store.dispatch({
    		type: 'DIRECT_LINE/POST_ACTIVITY',
    		meta: { method: 'keyboard' },
    		payload: {
    		 activity: {
    			type: 'event',
    			name: 'sampleTriggerEvent',
    			value: { sampleInput: "This is a test" },
    			channelData: { postBack: true }
    		 }
    		}
    	 });

    Based on the sample code provided, you need to use Text(System.Activity.Value.sampleInput) to properly retrieve the value in Copilot Studio.

  • Viswanath M Profile Picture
    8 on at
    I have the same issues.
    Event received trigger is not working

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard