{"id":13764597,"url":"https://github.com/CiscoDevNet/node-sparkbot-samples","last_synced_at":"2025-05-10T19:31:28.346Z","repository":{"id":12431654,"uuid":"71787007","full_name":"CiscoDevNet/node-sparkbot-samples","owner":"CiscoDevNet","description":"Chatbot samples leveraging the node-sparkbot library for Webex Teams","archived":false,"fork":false,"pushed_at":"2022-12-10T16:24:46.000Z","size":880,"stargazers_count":21,"open_issues_count":11,"forks_count":28,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-14T21:54:19.689Z","etag":null,"topics":["chatbot","webex-teams"],"latest_commit_sha":null,"homepage":"https://github.com/CiscoDevNet/node-sparkbot","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":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-24T12:34:22.000Z","updated_at":"2023-02-09T03:06:20.000Z","dependencies_parsed_at":"2023-01-11T18:19:12.162Z","dependency_job_id":null,"html_url":"https://github.com/CiscoDevNet/node-sparkbot-samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fnode-sparkbot-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fnode-sparkbot-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fnode-sparkbot-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fnode-sparkbot-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/node-sparkbot-samples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253470887,"owners_count":21913754,"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":["chatbot","webex-teams"],"created_at":"2024-08-03T16:00:23.577Z","updated_at":"2025-05-10T19:31:28.025Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"JavaScript","funding_links":[],"categories":["Code samples"],"sub_categories":["Bot samples"],"readme":"# Webex Teams Chatbot examples in Node.js\n\nInterested in creating your own Webex Teams Chatbots ? \nGo through the examples below.\n\nIf you feel inspired, run your own version of these bots. \nSimply take the step-by-step tutorials at DevNet: [Run a Webex Teams bot locally](https://learninglabs.cisco.com/tracks/collab-cloud/spark-apps/collab-spark-botl-ngrok/step/1).\n\nThen, pick a [template](templates/) that suits your scenario, and customize it.\n\nNote that these bot samples leverage the [node-sparkbot](https://github.com/CiscoDevNet/node-sparkbot) Chatbot framework.\n\n__Also, if you're new to Webex Teams API, note that DevNet provides a full learning track: [Learning track](https://learninglabs.cisco.com/tracks/collab-cloud).__\n\n\n\n## [inspect](examples/inspector.js)\n\nProvides instant access to Webex Teams technical data (such as the space id, or the email of a space participant).\n\nFeatures illustrated by this example:\n- **Help command to display available commands**\n- **About command to get meta info about the bot**\n- **Welcome message as the bot is added in a room**\n- **Fallback message if a command is not recognized**\n- Uses the \"node-sparky\" library to requests the Webex Teams API\n\nThis bot can be run as is with either a Developer or a Bot access token \n\nInvite _inspect@webex.bot_ to meet the bot.\n\n![](docs/img/bot-inspect-welcome.png)\n\n\n\n## [roomId](examples/roomid-phantom.js)\n\nFetches the identifier of the space in which this bot has just been added, \npushes the roomId via a direct message, and leaves the inquired space right away.\n\nFeatures illustrated by this example:\n- Help command to display available commands\n- About command to get meta info about the bot\n- Fallback message if a command is not recognized\n- **Send a direct message and leaves the room**\n- Uses \"node-sparky\" library to interact with Webex Teams\n\nInvite _roomid@webex.io_ to meet the bot.\n\n![](docs/img/bot-roomId.png)\n\n\n\n## [room-stats](examples/room-stats.js)\n\nComputes stats for the space it is invoked from. \n\nFeatures illustrated by this example:\n- Help message to display bot commands\n- Welcome message as the bot is added in a room\n- **Custom command prefix #**\n- **Markdown formatting with lists \u0026 mentions**\n- **Runs with a Developer account**\n- Uses \"node-sparky\" library to invoke the Webex Teams API\n\nNote that this webhook must be run with a personal access token (from a fake Webex Teams account), because the bot must be able to fetch all messages from spaces, not only those for which bot is mentionned.\n\nInvite _stats@chatbot.land_ to meet the bot.\n\n![](docs/img/bot-room-stats.png)\n\n\n\n## [events](examples/devnet/bot.js)\n\nTells you about upcoming DevNet events.\n\nFeatures illustrated by this example:\n- Help command to display available commands\n- About command to get meta info about the bot\n- Welcome message as the bot is added in a room\n- Fallback message if a command is not recognized\n- **Command with integer argument** \n - **Markdown formatting with lists and hyperlinks**\n- Uses \"node-sparky\" library to wrap calls to the Webex Teams REST API\n\nInvite _CiscoDevNet@webex.bot_ to meet the bot.\n\n![](docs/img/bot-ciscodevnet-next.png)\n\n\n\n## [helloworld](examples/helloworld.js)\n\nA simple template to start from.\n\nFeatures illustrated by this example:\n- Welcome message as the bot is added in a room\n- Help command to display available commands\n- Fallback message if a command is not recognized\n- Markdown formatting\n- Leverages the \"node-sparkclient\" library to wrap calls to the Webex Teams REST API\n\nThis bot can be run as is with either a Developer or a Bot access token \n\n![](docs/img/bot-helloworld.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCiscoDevNet%2Fnode-sparkbot-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCiscoDevNet%2Fnode-sparkbot-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCiscoDevNet%2Fnode-sparkbot-samples/lists"}