Git Product home page Git Product logo

webexbot-template-se's Introduction

Webex Teams Bot - Template

Cisco's Webex Teams offers a wonderful platform for bot creation. However, many people who are new to the world of ChatOps and Cisco's REST APIs are struggling with creation of bots and their integration with existing services. So, the goal of this project is to provide a simple to use template for creating and setting up Webex Teams bots. It provides a ready-to-use framework for bot development with the back-and-forth communication between the Webex Teams client, the Webex cloud and the bot server already been implemented. The only thing that the users need to do by themselves is creating the actual bot functionality.


Table of Contents


1. Requirements

In order to run the bot in operation, you need the following:

  • A web-server running PHP7
  • Reachability to the Webex cloud
  • Python 3.X
  • Webex Teams bot credentials (Access token and Bot ID) from developer.webex.com

2. Setup

After copying the repository to your server, the bot need to be set up for development, testing and operation. This is done in four steps that need to be completed in the following order:

  • Install required Python libraries
  • Edit setup.json
  • Register the webhook with register.py
  • Edit webexbot.php to add some functionality to the bot

Install required Python libraries

Open up the terminal and type in:

$ pip3 install -r requirements.txt

Edit setup file

The setup.json file serves as a container for all the environment variables needed to set up the bot. By default, all the variables are blank, so you need to fill in your personal information:

  • target_url: The URL of the folder inside your server where all the bot files are hosted
  • webhook_name: An arbitrary name for the webhook
  • access_token: Access token of the bot
  • bot_id: Bot ID

Register webhook

As a next step you need to create and register a webhook. For this, open up the console inside the repository folder and type in:

$ python3 register.py

Create bot logic

Now, in order to create some functionality for the bot, you need to edit webexbot.py inside the /includes folder. Go to the answer() function and edit the highlighted part of the code at your will.

webexbot-template-se's People

Contributors

mikdem92 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.