Skip to content

sparkbox/lunch-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lunch-bot

lunch-bot-icon

Deploy

This is a Slack bot that parses the Sparkbox lunch Google Sheet and reminds us who is on duty for the upcoming Friday lunch.

To run the app there are several ENV variables that you need to set:

sheetUrl

URL to the Google Sheet you'll be using with your team. Here's a sample Sheet you can copy to start your own.

sheetID

ID of the Google Sheet you want to parse. In our sample Sheet, the ID is 1fZXtKnxwcxP4GWGMRFtGun1VOnDYuiAgAR_yWlgEx_o.

slackToken

The Slack bot token you received when installing and configuring the lunch-bot in Slack Bots

groupID

Optional: The ID of the Slack group to alert.

serviceEmail and sheetPem

This is an email and public key you generate for lunch-bot to use in reading via the Google Sheets API. To generate your serviceEmail:

  1. Create a project in Google Developer Console, for example: "Sheets App".
  2. Enable Drive API for project under APIs & auth > APIs.
  3. Create service auth credentials for project under APIs & auth > Credentials > Create new Client ID: Service account.
  4. Collect the listed service email address.
  5. Regenerate and download the P12 key.
  6. Convert the .p12 file into .pem format:.
openssl pkcs12 -in *.p12 -nodes -nocerts > sheets.pem

NOTE: when prompted for password, it's notasecret

Finally, share the Sheets document to service email address using the Share button on your sheet.

Thanks to the google-sheets-api npm module for providing the instructions for serviceEmail and sheetPem.

About

A Slack bot to remind us of our lunch duties.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •