View Code? Open in Web Editor
NEW
RandomBot - shuffle the member of google chat space and also anything
Home Page: https://randombot.yaskur.com/
License: MIT License
google-chat-shuffler's Introduction
Chat app that can be used to random google chat space member or anything else
Quick shuffle the chat space members
Unit Test (ready to TDD)
No database needed
Using google cloud task (AWS SQS equivalent)
Shuffle from input
Choose how many item will be showed (winner count)
Random GPT, random anything using GPT prompt (e.g random number, quotes, places etc)
Make the app configurable (need a DB)
Scheduler (example use case: send daily quote or motivation to google chat space)
Random based on input in mentioned message:
Random member of current google chat space
You can also get random quotes, motivation, number, places or anything else using this app
Minimum NodeJS 16
yarn (optional)
Google Cloud project that enabled Cloud Function, Cloud Task, Google Chat API, etc or click here
Google Workspace account
Google Cloud CLI (how to install )
run yarn install
to install dependencies
run yarn test
to make sure no failing of functionality
run cp .env.yaml.examle .env.yaml
to copy .env.yaml.example to .env.yaml
fill the value on .env.yaml
file to correct config/environment
run gcloud config set functions/region <your-region>
with the same region in .env.yaml
run yarn deploy
to deploy
How to setup google chat app:
In Google Cloud Console, search for "Google Chat API" and click Google Chat API.
Click Manage
button.
Click Configuration and set up the Google Chat app:
In App name, enter the app name (e.g RandomBot Custom).
In Avatar URL, enter the logo(e.g https://developers.google.com/chat/images/quickstart-app-avatar.png ) .
In Description, enter the app description.
Under Functionality, select Receive 1:1 messages, Join spaces and group conversations, and Log errors to Cloud Logging.
Under Connection settings, select App URL and paste the URL for the Cloud Function trigger into the box.
Under Permissions, select Specific people and groups in your domain and enter your email address.
Click Save
button. And done. You can use your app in google chat. Just search your app in "Find apps" menu
google-chat-shuffler's People
Contributors
Stargazers
google-chat-shuffler's Issues
At the moment, the app is limited to the command ID 2 (/shuffle_members). However, we have plans to expand its functionality to support the following features:
Mention Support: Users can mention and create shuffle based on the chat message. e.g @appName "Option 1" "Option 2" "Option 3"
App Dialog Form: When users use the command ID 1, a dialog form will appear, allowing them to input options. By default, the input field will be pre-filled with the names of all members in the chat space."
We are actively working on implementing these features to enhance the app's capabilities. Stay tuned for updates!