Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Is it possible to send and receive events within copilot studio

Like (0) ShareShare
ReportReport
Posted on 5 Jan 2024 10:42:00 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:
  • Viswanath M Profile Picture
    8 on 26 Sep 2024 at 13:20:37
    Is it possible to send and receive events within copilot studio
    I have the same issues.
    Event received trigger is not working
  • CHY Profile Picture
    3 on 24 Apr 2024 at 19:11:16
    Re: Is it possible to send and receive events within copilot studio

    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.

  • adilei Profile Picture
    on 25 Mar 2024 at 09:52:10
    Re: Is it possible to send and receive events within copilot studio

    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)
  • drlreinhard7 Profile Picture
    Microsoft Employee on 25 Mar 2024 at 06:35:09
    Re: Is it possible to send and receive events within copilot studio

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

  • manianna Profile Picture
    6 on 20 Mar 2024 at 02:38:06
    Re: Is it possible to send and receive events within copilot studio

    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' }
    }
    } );

  • Verified answer
    HenryJammes Profile Picture
    on 05 Jan 2024 at 10:45:02
    Re: Is it possible to send and receive events within copilot studio

    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"
    }

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

Overall leaderboard