Lunchly
Slack bot that announces daily catered meals
Lunchly is a Slack bot that posts consistent, useful daily meal announcements for companies with scheduled food catering. It only supports ZeroCater because that is the catering service used at my office, but feel welcome to submit a pull request adding support for other catering services.
Requirements
Lunchly runs on Node 8+ and uses Slack's Real Time Messaging API and Web API. ZeroCater integration is provided via the @lunchly/service-zerocater plugin, which exposes a today()
method to fetch today's meal.
Install
To get started, clone this repository and install dependencies using npm
.
# Get the code
git clone https://github.com/lunchly/slack-bot.git
# Install dependencies
npm install
Configure
Once you have complete the above steps your instance of Lunchly is ready to be configured. A list of channels to monitor and their associated ZeroCater account IDs is required. Your ZeroCater account ID can be found in the URL of your account's meal page.
-
Copy
sites.example.json
tosites.json
and replace with your values. -
If you don't already have one, create a new bot user for your Slack team. You'll need the bot token (begins with
xoxb-
) to run Lunchly.
Run
To run Lunchly, ensure the configuration steps above are completed, and do the following:
Development
SLACK_BOT_API_TOKEN=xoxb-0000-your-token npm run dev
Production
SLACK_BOT_API_TOKEN=xoxb-0000-your-token npm run start
Use
Lunchly listens for !lunch
in all channels it is a member of. If a meal is found for that day then the bot will post a message containing details about the meal.
License
MIT © Chris Vogt