{"id":13764630,"url":"https://github.com/CiscoDevNet/botkit-template","last_synced_at":"2025-05-10T19:31:36.092Z","repository":{"id":25420768,"uuid":"103621167","full_name":"CiscoDevNet/botkit-template","owner":"CiscoDevNet","description":"Botkit template for Webex Teams","archived":false,"fork":false,"pushed_at":"2023-02-16T19:12:09.000Z","size":1950,"stargazers_count":46,"open_issues_count":6,"forks_count":404,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-21T10:01:57.735Z","etag":null,"topics":["botkit","cisco-webex","glitch","webex-teams"],"latest_commit_sha":null,"homepage":"https://learninglabs.cisco.com/tracks/collab-cloud/spark-apps/collab-spark-bot-hosting/step/1","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CiscoDevNet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-09-15T06:15:30.000Z","updated_at":"2024-08-06T09:51:40.000Z","dependencies_parsed_at":"2024-01-30T06:59:08.892Z","dependency_job_id":"1f950d5e-a508-461f-9f5e-709748df9b66","html_url":"https://github.com/CiscoDevNet/botkit-template","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fbotkit-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fbotkit-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fbotkit-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fbotkit-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/botkit-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253470963,"owners_count":21913766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["botkit","cisco-webex","glitch","webex-teams"],"created_at":"2024-08-03T16:00:24.282Z","updated_at":"2025-05-10T19:31:35.738Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"JavaScript","readme":"# Botkit template\n\nThis project implements a Botkit + Webex adapter bot, based on the [generator-botkit](https://www.npmjs.com/package/generator-botkit) Yoeman template, providing a few extra good-practice features, plus several interesting samples:\n\n- Optionally use Webex Node.js SDK websockets for incoming events and messages, instead of webhooks\n\n- A 'health check' URL: check bot availability, uptime and metadata by browsing to the bot's public URL\n\n- Quality-of-life features: fallback/catch-all module; welcome message when user joins a space\n\n- 'Help' command auto-generation function\n\n- Redis/MongoDB storage support for persistent/scalable storage of conversation state\n\n- checkAddMention() function to automatically format bot commands for 1:1 or group space usage\n\n## Websockets vs. Webhooks\n\nMost Botkit features can be implemented by using the Webex JS SDK websockets functionality, which establishes a persistent connection to the Webex cloud for outbound and inbound messages/events.\n\nWebex also supports traditional HTTP webhooks for messages/events, which requires that your bot be accessible via a publically reachable URL.  A public URL is also needed if your bot will be serving any web pages/files, e.g. images associated with the cards and buttons feature or the health check URL.\n\n- If you don't need to serve buttons and cards images, you can set the environment variable `WEBSOCKET_EVENTS=True` and avoid the need for a public URL\n- If you are implementing buttons \u0026 cards, you will need a public URL (e. g. by using a service like Ngrok, or hosting your bot in the cloud) - configure this via the `PUBLIC_URL` environment variable \n\n## How to run (local machine)\n\nAssuming you plan to us [ngrok](https://ngrok.com) to give your bot a publically available URL (optional, see above), you can run this template in a jiffy:\n\n1. Clone this repo:\n\n    ```sh\n    git clone https://github.com/CiscoDevNet/botkit-template.git\n\n    cd botkit-template\n    ```\n\n1. Install the Node.js dependencies:\n\n    ```sh\n    npm install\n    ```\n\n1. Create a Webex bot account at ['Webex for Developers'](https://developer.webex.com/my-apps/new/bot), and note/save your bot's access token\n\n1. Launch Ngrok to expose port 3000 of your local machine to the internet:\n\n    ```sh\n    ngrok http 3000\n    ```\n\n    Note/save the 'Forwarding' HTTPS (not HTTP) address that ngrok generates\n\n1. Rename the `env.example` file to `.env`, then edit to configure the settings and info for your bot.\n\n    \u003eNote: you can also specify any of these settings via environment variables (which will take precedent over any settings configured in the `.env` file) - often preferred in production environments.\n\n    To successfully run all of the sample features, you'll need to specify at minimum a `PUBLIC_URL` (ngrok HTTPS forwarding URL), and a `WEBEX_ACCESS_TOKEN` (Webex bot access token).\n\n    \u003eIf running on Glitch.me or Heroku (with [Dyno Metadata](https://devcenter.heroku.com/articles/dyno-metadata) enbaled), the `PUBLIC_URL` will be auto-configured.\n\n    Additional values in the `.env` file (like `OWNER` and `CODE`) are used to populate the healthcheck URL meta-data.\n\n    Be sure to save the `.env` file!\n\n1. You're ready to run your bot:\n\n    ```sh\n    node bot.js\n    ```\n\n## Quick start on Glitch.me\n\n* Click [![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/import/github/CiscoDevNet/botkit-template)\n\n* Delete the `.env` file that Glitch created automatically\n\n* Rename `.env.example` to `.env`, then open it for editing.\n\n    Find the `WEBEX_ACCESS_TOKEN` variable, paste in your bot's access token\n\n    **Optional**: enter appropriate info in the \"Bot meta info...\" section\n\n    \u003eNote that, thanks to the Glitch `PROJECT_DOMAIN` env variable, you do not need to add a `PUBLIC_URL` variable pointing to your app domain\n\nYou bot is all set, responding in 1-1 and 'group' spaces, and sending a welcome message when added to a space!\n\nYou can verify the bot is up and running by browsing to its healthcheck URL (i.e. the app domain.)\n\n## Quick start on Heroku\n\n* Create a new project pointing to this repo.\n\n* Open your app's **Settings** tab, and reveal your **Config Vars**\n\n* Add a `WEBEX_ACCESS_TOKEN` variable with your bot's access token as value\n\n* Add a `PUBLIC_URL` variable pointing to your app's Heroku URL\n\n    \u003eIf your app is using [Dyno Metadata](https://devcenter.heroku.com/articles/dyno-metadata), the public URL will be detected automatically\n\n    ![](assets/images/heroku_config-variables.png)\n\n* In the upper right under the **More** dropdown, select **Restart all dynos**    \n\nYou bot is all set!  You can invite it to 1-1 and 'group' spaces, see it sending a welcome message when added, and responding to commands (try `help`.)\n\nYou can always verify the bot is operational by browsing to its healthcheck URL (i.e. the app domain.)","funding_links":[],"categories":["Code samples"],"sub_categories":["Bot samples"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCiscoDevNet%2Fbotkit-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCiscoDevNet%2Fbotkit-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCiscoDevNet%2Fbotkit-template/lists"}