/high-five-bot

A Webex Teams bot built to enhance interaction and recognition within the 2023 January - June CXA Co-op experience!

Primary LanguageJavaScriptMIT LicenseMIT

high-five-bot

Highfive can always be found online at CXHighFiveBot@webex.bot!

A Webex Teams bot built to enhance interaction and recognition within the 2023 January - June CXA Co-op experience!

This bot requires a running ngrok server for the Webex API webhook and is built off of the Webex Node.js Framework by the Webex Community. You can view this framework here.

Any mention of a "card" or "adaptive card" is a reference to Microsoft Adaptive Cards, which are heavily utilized in this bot. You can find the reference for Microsoft Adaptive Card utilization with Webex bots here.

Features

The bot can be messaged directly to evoke any of the available bot commands!

Within a space, the bot must be mentioned with an accompanied command to receive the interaction.

i.e to evoke the poll command in a space, type @mention poll.

Here is a list of available commands high-five-bot will handle!

getallemails

highfive

birthdaycard

poll

freeform

gas

bulletin

help

Highfive will respond to any mention without a valid command with the 'help' card, which can also be invoked with 'help'!

image

getallemails

Syntax: getallemails

Retrieves all emails in the space that the command is sent and sends the list to the invoker.

highfive

Syntax: highfive <recipient-email>

Highlights High Five recipients :) Supports multiple emails.

highfiveimage

recipient-email is parsed for its string before the '@' to reference a local-storage image to use in './images'.

birthdaycard

Syntax: highfive <recipient-email>

Highlights birthday person! Uses person's profile picture image available on Webex API.

birthdayimage

poll

Syntax: poll

Evokes the bot to post an adaptive card with text inputs for creating a new poll. Only the user that evoked the bot can submit this card.

This command can handle an infinite number of poll answers, separated in the text box by ';' semicolons. This poll can handle multi-select, and toggle between anonymous and non-anonymous poll results. Enabling the 'Other' freeform option will allow the poll takers to submit their answer as 'Other' and specify their choice in a text box.

image

Once submitted, the message is deleted and replaced with the created poll:

image

Simultaneously, the evoker is sent a direct message with a card telling them how to view the results of the poll:

image

Clicking "View Current Results" will message the user with the current results:

image

freeform

Syntax: freeform

Much like poll, evoking freeform will yield a reply from the bot for a question to post. freeform is meant for feedback-style questions, wherein users of the Space are encouraged to type out submissions with a limit of 500 characters. Only the user that evoked the bot can submit this card. The "Anonymous submissions" checkbox toggles whether the results of the question will display the respective submitter's names with their responses.

image

Once submitting a question, the message is deleted and replaced with a freeform text box for responses:

image

Simultaneously, the evoker is sent a direct message with a card telling them how to view the freeform submissions:

image

Clicking "View Current Responses" will message the user with all recorded responses:

image

gas

Syntax: gas Only works as a direct message to Highfive.

Gas someone up! Invoking gas will yield a card to send a recipient an anonymous commendation to which they can reply to once if they wish! This feature is meant to encourage your team to lift each other up!

image

After sending your positive message:

image

What the recipient sees:

image

Replying to gas:

image

Receiving a reply to your gas:

image

After sending a reply:

image

bulletin

Syntax: bulletin

Bulletin is a powerful feature that allows you to concatenate important resources into individual 'Bulletin' boards for your team to access right from Webex! Images coming soon.

image

Creating a Bulletin

image

image

Editing a Bulletin

image

Adding Items to a Bulletin

image

Viewing a Bulletin

image

Editing Bulletin Permissions

image

Adding Editors to your Bulletin

image

Adding Viewers to your Bulletin

image

Deleting your Bulletin

image

image

Credits

Special thanks to Brad, Julianna, and Max for breaking the bot on purpose, and to Victor Algaze for encouraging me :)