event Received trigger is not fired when sending an event activity in bot framework composer

271 Views Asked by At

I am trying to send an activity from the botController.cs and I want to catch it from the bot framework composer. here is the code when I am sending the event activity:

var userAccount = new ChannelAccount("e7h84gd7-fbb5-y3u6-h9d8-f8q3789649ec", "User");
var botAccount = new ChannelAccount("274d8t53-7492-98hr-r625-b11e3ht7e6wq", "Bot");
Activity activity = new Activity
{
    From = userAccount,
    Recipient = botAccount,
    Type = ActivityTypes.Event,
    Name = "Agent_Closed_Session",
                
};
await turnContext.SendActivityAsync(activity);

this is in the bot composer to catch it: enter image description here

this is the response, it shows that the sender of the event is the bot and the recipient is the user, but in the request, I mentioned that the sender should be the user and the recipient should be the bot enter image description here

So in the action in the event activity trigger (response text; testtt) is not performed

1

There are 1 best solutions below

1
Ravi Raushan On

In the event trigger condition field, please provide the event name:

turn.activity.Name == "Agent_Closed_Session"

event received condition