cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

If your Cloud Collaboration question is not answered quickly, please email devsupport@webex.com for additional help

717
Views
5
Helpful
2
Replies
Highlighted
Beginner

Rasa Connector with Webex

Hi

 

I try to run my Rasa bot with Cisco Webex Teams.

On my computer I started 

ngrok http 5002

and Rasa with 

rasa run --port 5002 --credentials credentials.yml

I created an integration based on this guide: Cisco Integration

I’m not quite sure what redirect_uri I have to choose. I tried with https://.ngrok.io/webhooks/webexteams/webhook 

I can see a GET request to ngrok. But this method seems to be not allowed. This is the message from

ngrok: GET /webhooks/webexteams/webhook 405 Method Not Allowed

Do you have any idea for this? 

What is the correct URI do I have to choose for my integration?

 

2 REPLIES 2
Highlighted
Cisco Employee

I hope its not still pending :)  the method not supported on the url should not prevent it from working on your bot .

Highlighted
Cisco Employee

@nathy1984 I was able to get Rasa working with Webex Teams! Here's what I had to do:

 

1. Make sure Rasa is publicly accessible (ngrok in my test example)
2. Create a Webex Teams bot. https://developer.webex.com/docs/bots
3. Create a Webex Teams integration for all "messages" types which points to the publicly exposed Rasa url (ngrok) https://developer.webex.com/docs/integrations
4. Use a Webex Teams API (with Webex Team bot's access token) to create a webhook to sign it up for this new Integration you just made. https://developer.webex.com/docs/api/v1/webhooks/create-a-webhook. Point the "targetUrl" to https://yourRasaUrlngrok.io/webhooks/webexteams/webhook
Now, at this point all message events the bot receives in Webex Teams will be posted to the Webhooks url (publicly exposed Rasa ngrok url). So now we need to make sure Rasa can consuming this incoming Webhooks with its credentials.yml file.
5. Make sure Rasa credentials.yml has:
webexteams:
access_token: (Webex Team's bot API access token)
Exactly like documented here: https://rasa.com/docs/rasa/connectors/cisco-webex-teams/
You can also optionally use "room", but that makes it so the bot will respond into the room (not the DM). For me personally, I like it better with "room" left out of credentials.yml, but having this option is still great.

 

Creating the Webex Teams bot and Webex Teams integration and then signing the bot up for this integration was the piece that took me some time of understand. Once I setup that part with the steps above, it worked great. Also, always use the bots_access token, not the Integration's access token. 

 

Now, when you DM the bot in Webex Teams, it will respond with the Rasa responses. I hope this helps others! Good luck.

This widget could not be displayed.