A daily reminder bot for GroupMe
Set a reminder for your whole group every day at a specific time.
View the full list of available commands. The following are the recommended variations:
- Hey Reminder Bot, set reminder to
X
- Hey Reminder Bot, activate
- Hey Reminder Bot, set reminder time to
X
- Hey Reminder Bot, set reminder day to (everyday, weekdays, weekends, M/T/W/Th/F/S)
- format for days can be
M/Mo/Monday/Mondays
etc - Hey Reminder Bot, set reminder time to 6pm on weekdays
- Hey Reminder Bot, activate the reminder
- Hey Reminder Bot, use the running log preset
- Hey Reminder Bot, are you awake?
- Hey Reminder Bot, what is the status?
Confused? Check out these instructions.
- Create Heroku App and configure Heroku Scheduler (if running free dyno)
- Heroku auto-kills your free dynos, so we need to add the Heroku Scheduler add-on
- Create a new job to run
node cron-check.js
every 10 minutes - If you have a paid dyno that does not shut down, you can skip this step
- Create a new GroupMe bot
- Enter
Reminder Bot
as the name - Enter
https://i.groupme.com/1000x1000.png.46ad37818d924567985aa2e7f138f791
as the avatar URL - Enter the callback URL. This will be the
/hook
route of wherever you are deploying. For Heroku, it will beYOUR-APP-NAME.herokuapp.com/hook
- Add
BOT_ID
,GROUP_ID
, andDATABASE_URL
to the environment variables
- Include your
BOT_ID
andGROUP_ID
from the GroupMe API bots page - Database must be a postgres database. If you are using free Heroku Postgres, the
DATABASE_URL
env var will already be configured.
- Deploy and start chatting with Reminder Bot
- Say "Hey RBot, status" in the group that you added the bot to
- Fork this repo
- Click fork
- Click new -> create new app and name it whatever you want (
reminder-bot-6000
). Remember this name. - Click create app
- Scroll down to Connect to GitHub
- Select the repository you just forked (RBot)
- Go to the GroupMe Bots page (you may need to create an account) and click Create Bot.
- Enter
Reminder Bot
as the Name - Enter
https://i.groupme.com/1000x1000.png.46ad37818d924567985aa2e7f138f791
as the Avatar URL - If using Heroku, enter in the Callback URL as
YOUR-APP-NAME.herokuapp.com/hook
, replacingYOUR-APP-NAME
with the name of the Heroku app you created in step 2 (reminder-bot-6000
for example). - If you are hosting somewhere other than Heroku, set the callback URL to the
/hook
route of your hosted site. For example, if your hosted domain ishttps://my-cool-bot.example.com
, the callback URL would behttps://my-cool-bot.example.com/hook
- In your Heroku app dashboard, navigate to Settings and click Reveal Config Vars
- Enter
BOT_ID
as KEY and your GroupMe Bot ID (found on the GroupMe Bots page) in the VALUE section. Then click "Add." - Enter
GROUP_ID
with the Group Id associated with your bot
- Add-on Heroku Postgres Heroku Scheduler
- For Heroku Postgres, go to the Resources tab of the app dashboard. Then, simply search for "Heroku Postgres" and select the
Hobby Dev - Free
option (no further configuration required) - For Heroku Scheduler, go back to the Resources tab and search for Heroku Scheduler. Click Submit Order Form.
- Note: Heroku may require you to add a credit card to verify your identity. The card added should not be charged for the purposes of this app, but it unfortunately is a required step if you are hosting with heroku.
- Click on the Heroku Scheduler in the list and it will open a new tab
- Click Add Job and select Every 10 minutes. This will wake up our bot to check if it is time to send a message every 10 minutes.
- In Run Command, type
node cron-check.js
and then press Save Job
- Start chatting with the Reminder Bot
- In the group you added the bot to, try typing "Hey Reminder Bot, what is the status"
- Ask the reminder bot "Hey RBot, what are the available commands?" for more
- Each message sent in GroupMe is also sent to the bot
- The bot has code written to parse the message and tell if you are talking to him
- If you are talking to him, he will listen to you and update the database when you configure settings or enable the daily reminder
- Heroku automatically puts the server to sleep when you haven't interacted with the bot for 30 minutes
- Heroku will wake the bot up temporarily every 10 minutes to check if it is close to reminder time, and stay awake if it is close to time
- The bot sends the message to GroupMe at the scheduled time
This code is licensed under GNU General Public License v3.0