A command line tool to run when you'll be out of the office for a while:
- Calculates your first day back based on the amount of your leave and the day you you start your leave
- Updates your Slack status
- Sets you away in Slack
- Sets a vacation response in Gmail
- Sends an email to your team
- Creates an event on your calendar for the duration of your leave
npm install
npm link
You'll need to set this up once to allow the scripts to access parts of your Gmail and Calendar accounts.
- Open the following guide: https://developers.google.com/gmail/api/quickstart/nodejs
- Follow all steps under Step 1: Turn on the Gmail API.
- From the instructions, save
client_secret.json
to this directory. - From the console, enable Google Calendar.
- Run
node bin/auth-google.js
and follow the instructions in terminal to authenticate your account. - In terminal, you should see the message: Success! You are connected to Gmail and Calendar.
You'll need to set your Slack access token for the channel where you want to update your status.
echo "export SlackAccessToken=0000ffff0000ffff0000ffff0000ffff0000ffff" >> ~/.bash_profile
You'll also need to get your Slack username in your channel. A fast way to find this is to use the users.info method tester, select the desired channel, and then click your username next to the user
field. This will populate the input with the value you'll set here:
echo "export SlackUser=U00000000" >> ~/.bash_profile
Update config.js to set information about your leave, preferences, and customize all the messages that get sent along the way.
Run npm test
to validate your config file.
From terminal, run:
away