A bot for the Cisco Webex application, the primary purpose of which is collecting daily statuses from different team members. Written on Google Apps Script.
Register a new bot here: https://developer.webex.com/my-apps. You will need the bot name, bot email and token.
nodejs
npm install
clasp login
clasp create --type standalone
.clasp.json
by adding filePushOrder
:
{
"scriptId": "...",
"filePushOrder": [
"Common.ts",
"RequestManager.ts",
"Store.ts",
"BotCache.ts",
"Constants.ts",
"Utils.ts"
]
}
clasp push
. Type Yes
for Manifest file has been updated. Do you want to push and overwrite?
clasp open
and open the project link in the browser.Test.gs
file and run the test
function to initialize a default config.Publish
-> Deploy as webapp...
-> Click Update
.Web app URL
, it’s your webAppHook
for the MainConfig.In browser, open File
-> Project Properties
-> Script Properties
and copy the content of property Config
.
This config has to be updated inline per your needs. For convenience, you can edit it in your favourite JSON editor
and then save the new value. Default config example:
{"botName":"NotSpecified","botEmail":"NotSpecified","admins":["NotSpecified"],"botAuthToken":"NotSpecified","webAppHook":"NotSpecified","dailyReportTo":[],"managers":[],"dailyStatusRoomId":"NotSpecified","operationsRoomId":"NotSpecified","debugRoomId":"NotSpecified","helpPageUrl":"NotSpecified"}
The initial required params are: botName
, botEmail
, botAuthToken
, webAppHook
.
Suggestions:
Main.gs
file and run the Bot_Init
function.@mybot help
.@mybot init debug room
. This room will be used for Debug messages.@mybot help
.To run functions, such as Bot_AskStatuses
, Bot_CheckStatuses
, on a regular basis, use the Google Apps Script triggers feature:
Some functions require additional permissions. Run a desired function manually to explicitly give it permissions (one time operation).
That’s it!