How to trigger an intent using botframework webhook

Hi, I want to trigger an intent externally using webhook of my msteams channel…Can someone help me

@ChrisRahme Can u help me out

@erohmensing can you help me out?

send('/intent_name')

Ref: Rich Responses

@ChrisRahme I want to trigger intent externally using webhook of msteams

Answer/logic stays the same: You need to send /intent_name to the Rasa server.

Of course, replace “intent_name” with the name of the intent you want to trigger.

@ChrisRahme Hi…I know that we have to send a payload using the intent name…but i am not able to understand how to send it to a msteams channel webhook to a specific conversation

You need to send it from Teams to Rasa

@ChrisRahme but I want to trigger externally…not from msteams…I have the user details along with conversation id

@nik202 do u have any solution for this?

Wherever you want to trigger it from, the important part is that you send it to Rasa as you would with any regular message via REST.

You just need the conversation ID, which you have. Then you POST via REST a JSON message {message, sender} to http://yourserver/webhooks/rest/webhook.

For example, {"message": "/greet", "sender": "ABC123"}.

Please read about the REST Channel in the docs.

@ChrisRahme Where should i use the conversation id parameter?

It’s sender

@ChrisRahme I have a couple of doubts.

  1. Do I have to mention the channel somewhere?

  2. If i hit this api, would the bot respond in msteams channel to that user?

@ChrisRahme Hi…I tried hitting the rest channel in postman, but i am getting the response back in postman itself but not in the msteams channel

Yes of course.

Okay I see your constraints. Is there no way to send the HTTP request from inside Teams’ API?

You can try Inject an intent into a conversation. I have never tried it but it may work.

@ChrisRahme The http to trigger an intent has been implemented from rasa for all channels apart from the botframework…I will try injecting an intent method

1 Like

@ChrisRahme The method which u have given does not have msteams channel implementation…It has all channels other than msteams