Slack app for building relationships at planning center. This train themed application creates an event that anyone who has time and wishes to participate can join the train to get to know their teammates better.
This is a Node.js application that has two main components:
- a web component using Express for Slack Integration callbacks.
- a cli component that expose commands for automatic scheduling.
The basic workflow of this project in action:
- Scheduler prepare's train for departure by posting an all aboard message to the specified channel two hours prior to departure.
- Users react using 🎫 to signify their desire to board the train.
- Scheduler, at specified time (currently 8:30am PT and 1:30pm PT), starts the train by creating a DM between two (or three) random individuals that reacted to the intial all aboard message.
- Users are given randomly chosen prompts and one person is selected to begin the call.
- If users need additional conversation prompts, there is an interactive button that will go fetch additional prompts.
These instructions will get you a copy of this project up and running on your local machine for development and testing. See deployment notes on how to deploy the project on a live system.
yarn
to manage packages and dependencies. Ensure yarn, node, and npm are installed.
Review config/default.json
to ensure the base configuration is correct.
Copy config/development.json.example
to config/development.json
and fill out the necessary configurations (see ).
{
"slack": {
"teamtrain": {
"channel": "your-slack-channel",
"token": "slack-bot-privilege-token",
"verificationToken": "slack-app-verification-token"
}
}
}
Install dependencies
yarn install
Start it up and run the CLI components!
$ yarn run prep-train 1:30pm
🚂 will depart at 5:00pm
$ yarn run start-train
For the user requests new prompt Slack interactive component, use ngrok as a tunnel to your local machine.
When ngrok is running, in your Slack App, set the callback url to https://yourhash.ngrok.io/callback
.
Start the webserver
yarn start
And profit! The interactive Slack buttons will now be functional.
There are a few things to keep in mind:
- Production uses
config/production.json
andconfig/custom-environment-variables.json
to set up production environment configurations and environment variables respectively. config/production.json
is required to exist, even if you only environment variables.- If using ngrok locally, be sure to update your Slack component callback to your deployed environment host.
- yarn - Dependency Management
- config - environment configuration management
- redis - datastore
- Express - web framework
- Slack bot integration
- GoogleSheets integration
We encourage you to contribute to Team Train! Please check out the Contributing to Team Train for guidelines about how to proceed. Join us!
Everyone interacting in Team Train's codebase, issue trackers, chat rooms, and mailing lists is expected to follow the Team Train code of conduct.