Skip to content

john-goldsmith/slack-lunch-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunch Slack Bot

A Slack bot that uses Yelp to suggest and save places to go for lunch.

Technologies

  • Node
  • Slack Bots
  • Botkit (Slack Bot API)
  • Yelp API
  • AWS
  • MongoDB
  • Monk (MongoDB API)

Prerequisites

Environment Variables

Name Purpose Example Required
SLACK_API_TOKEN The Slack API auth token. Abc123 Yes
MONGODB_URI The MongoDB connection string. localhost:27017/my_database Yes
YELP_CONSUMER_KEY The Yelp API consumer key Abc123 Yes
YELP_CONSUMER_SECRET The Yelp API consumer secret Abc123 Yes
YELP_TOKEN The Yelp API token Abc123 Yes
YELP_TOKEN_SECRET The Yelp API token secret Abc123 Yes
DEFAULT_LOCATION The default location that Yelp will use for searches '18022 Cowan, Irvine, 92614' Yes

Running Locally

  1. Create a Slack bot (this will yield an API token)
  2. Create a Yelp account (or login to an existing one)
  3. Obtain a Yelp API key
  4. Duplicate .env.sample, rename it to .env and provide values for each key (see above)
  5. npm i
  6. Ensure that MongoDB is running and the database has been created at the location specified in the environment variable
  7. npm start (or ./node_modules/.bin/pm2 start index.js)
  8. Invite your bot to a channel and start chatting!

To Do

  • Tests
  • Database seeding (npm run seed)
  • User voting

Resources

Releases

No releases published

Packages

No packages published