


run ( host = 'IP or DNS NAME OF THE EC2 INSTANCE', port = 8090 ) Webex Teams bot configuration get_json () personid = data if personid = bot_id : return 'ok' else : if data != webhook_id : return 'ok' else : msgid = data roomId = data txt = get_message ( msgid, accesstoken ) create_message ( roomId, txt ) return "ok" app. route ( "/", methods = ) def handle_message (): data = request. loads ( x ) id = ( x ) return id def create_message ( roomId, message ): messageUrl = "" dane = # app. post ( url, data = dane, headers = headers ) x = created. Import json, requests from flask import Flask, request app = Flask ( _name_ ) # functions:ĭef post_request ( url, dane, headers ): created = requests. Docker configurationĪfter reading this helpful post about Building Minimal Docker Containers for Python Applications we’ve decided to use alpine image.Ĭreate an empty directory where files for the container will be located:
#Webex teams rss bot how to
A very detailed step-by-stem on how to create it could be found at Automating Webex Teams (Python) tutorial. The bot’s identity was created from Webex Teams Developer Portal. The Docker was installed according to this doc Docker Basics for Amazon ECS. We are using a AWS EC2 AMI Linux instance (t2.small). In this post we will explore a procedure and caveats for a simple echo bot, just to show the methodology. So, we’ve decided to try out Docker for hosting bots, with the further idea to transfer them to other servers. However, it becomes complicate to manages all those bots on the same server, with different dependencies and packages (also we are guilty of not using virtual env properly). The easiest way for our “customers” to host those bots, is to use our teams servers. In our team, we are developing variety of bots for different functions/departments. This is a “How to” post on hosting Webex Teams bots.
