Base code for building WebEx Teams Bot hosted inside G suite using Google App Script (JavaScript).
We often hear that when creating simple WebEx teams bots, where to host the code and how to make it accessible can be slow down projects before they even get started. In today's world everybody has a google account. The goal is to show how easy it is to host the code inside of a google document. We'll show that google sheets can be a very workable database for your code along with hosting the application itself. As well, one of our peers created an awesome polling tool, but the tool died when he left Cisco, so why not rebuild it.
We were inspired by this article on building a Viber bot without code and want to take what Itamar Mula created and bring it to Webex Teams. For some this will be a simple poll bot they can use, but for others this will be the base of how to host a bot inside a g-suite document. Stretch goals include taking it further turning the first bot into a live polling tool that might be a simple version of what Kahoot or Poll Everywhere do (using Google Slides). Now that buttons and cards are in Webex Teams, that's another way to respond(see image).
Our solution will leverage the following technologies
Get your own Copy. Make a copy of this spreadsheet. Now with Buttons & Cards! Once you open Google Sheets, Click File > Make a copy…
Fill in your info in the userInput tab. There are several tabs, but start with userInput. In order not to break anything, only change the yellow boxes. Start with your name and email. The other two boxes we'll get to next.
Get a bot token. The top box, "Bot's Bearer Token" can be obtained by.
Get the url for your app script.
Build recipients list on the recipients tab. This can be done in 2 ways.
Build the questions tab. For each question (currently Max 10 questions per poll) you wish to ask as part of the poll / survey fill in columns B through E.
Start your poll. A new menu "Poll" has been added to the sheet. Select "Start Poll". Once selected, each recipient will receive the fist question, and if there are subsequent questions, they will get them right after completing the previous. Each question will go out sequentially to the users.
Watch the results. Raw data of each response can be found on the "responses" tab and on the "dataStorage" tab you can find aggregate info as well as pre-created charts (you may have to scroll down to see all charts). All data and charts will live update as new responses come in.
End poll. From the "Poll" menu select "Stop Poll". Note: Once the poll has been stopped, the bot will no longer take any communication (its webhook is deleted). Also, for your next poll, you can skip right to step 5 (or 6 if your recipients are the same).
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Owner
Contributors
Categories
Products
WebexProgramming Languages
JavaScriptLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community