Webex Teams Integration¶
A conversational app built using MindMeld can be integrated seamlessly with Webex Teams. In this tutorial, we will create a Webex Teams bot based on the Food Ordering blueprint. The food ordering app is an example of a deep-domain conversational agent that uses a knowledge base of restaurants and menu items to understand complex user queries that reference dishes from different restaurant menus.
In this quick start guide, we will use a webhook and ngrok to integrate the food ordering application to Webex Teams. By setting up a publicly accessible server, one can register the server’s IP address to the webhook, thereby allowing Webex Teams to send messages to the food ordering application. This guide should take between five and fifteen minutes to complete.
1. Register Webex Bot¶
Create a new Webex Bot integration and store the Bot’s Access Token safely.
Next, make sure you make the local server endpoint for port 8080 publicly accessible. This could be done through a system like Nginx.
2. Register Webex Webhook¶
Register a new webhook. Set the
targetUrl as ngrok’s public URL, set
messages, and set
created. Once you click Run, store the
id field in the response. This will be your webhook ID.
Download the food ordering blueprint.
import mindmeld as mm mm.configure_logs() bp_name = 'food_ordering' mm.blueprint(bp_name)
4. Start the food ordering server¶
Set the following environment variables and start the flask server.
cd food_ordering export WEBHOOK_ID=<insert webhook id> export BOT_ACCESS_TOKEN=<insert bot access token> python webex_bot_server.py
5. Test the integration¶
Create a Webex Teams space and add the bot to the space. To trigger the webhook, simply @mention the bot and converse with it.