Cisco Webex Teams Bot that fetches the latest from blog, github and meetup. Runs every hour (default) and stores the latest URL also in a database.


Modules supported
Database used
(for the modules)
# Enable modules to fetch data and create Webex Adaptive Cards
# Comment module if you want to disable a module
modules:
# URL to Cisco DevNet blog
blog:
- https://blogs.cisco.com/developer
# Github.com org name
github:
orgs:
- ciscodevnet
# BrightTALK
brighttalk:
- 17628
# Meetup group name
meetup:
- cisco-developers-club-stockholm
If you want to edit these URLs, for the modules.
Then clone this repo and edit config.yaml
Cisco Products & Services:
Third-Party Products & Services:
Tools & Frameworks:
You can create the DynamoDB Table with --init flag
{
"AttributeName": "type",
"KeyType": "HASH"
},
{
"AttributeName": "link",
"KeyType": "RANGE"
}
docker run -d \
-e AWS_ACCESS_KEY_ID=changeme \
-e AWS_SECRET_ACCESS_KEY=changeme \
-e AWS_DEFAULT_REGION=eu-north-1 \
-e WEBEX_TEAMS_ACCESS_TOKEN=changeme \
-e WEBEX_TEAMS_ROOM_ID=changeme \
robertcsapo/cisco-devnet-sweden-community-webex-bot
usage: run.py [-h] [--config CONFIG] [--table TABLE] [--init] [--delay DELAY] [--force] [--dry] [--debug] [--version]
Cisco DevNet community Webex bot
optional arguments:
-h, --help show this help message and exit
--config CONFIG Read different config file (default: config.yaml)
--table TABLE AWS DynamoDB Table (default: cisco-devnet-webex-bot)
--init Initialize database (default: False)
--delay DELAY Change delay in seconds (default: 3600)
--force Force update on latest from modules (default: False)
--dry Dry-run doesn't post anything to Webex (default: False)
--debug Display OS/ARGs settings (default: False)
--version show program's version number and exit
docker run -it --rm robertcsapo/cisco-devnet-sweden-community-webex-bot --config config.yaml --debug
git clone https://github.com/robertcsapo/cisco-devnet-community-webex-bot
vim config.yaml
docker-compose -f docker-compose.yaml up
docker-compose -f docker-compose-build.yaml up
Warning!
Changing the Cisco Webex Teams Adaptive Card template could cause this script to not work properly.
You can design your own Adaptive Cards, to be used with Cisco Webex Teams here
(More details about how adaptive cards works can be found here)
Replace your own designed adaptive card in the card.json file.
Then you need to match all the data objects in the cisco/webex.py file.
''' Read in Adaptive Card template '''
with open('card.json') as file:
data = json.load(file)
''' Below changes the data on Adaptive Card Template '''
Edit from here
''' Avatar Image URL for Card '''
data["content"]["body"][0]["columns"][0]["items"][0]["url"] = value["avatar"]
...
Stop editing here
''' ActionURL for Card '''
data["content"]["body"][3]["actions"][0]["url"] = value["url"]
Save the cisco/webex.py file.
Smart people responsible for the creation and maintenance of this project:
This project is licensed to you under the terms of the Cisco Sample Code License.
Content type
Image
Digest
Size
66.3 MB
Last updated
about 6 years ago
docker pull robertcsapo/cisco-devnet-community-webex-bot