Giter VIP home page Giter VIP logo

slack-birthday-bot's Introduction

Build Status Dependency Status

Slack birthday-BOT

A slack BOT that simply reminds Birthdays the funny way with animated random Giphy GIFs... for free ;-p

Demo

Goal

The goal of this project is to make a "BOT" that wishes happy birthday, on a dedicated channel.

NB : As integration is made thanks to a Webhook, you don't have to add an app to your Slack Team... good for people who are using free plans on Slack.

Requirements

To make this integration operational, all you need is :

  • A slack Webhook url dedicated to the birthdays channel (private or public)
  • A Giphy API token
  • A place to run your daily Job (Travis cron jobs is a good place to do that so all your stuff is in the cloud)...but you can run it wherever you like
  • A csv file that contains birthdays data (please take a look at data/birthdays.csv to get a running example)
  • A maven runtime (to make things easier to run ...)

All of these items are available for free.

Setup birthdays csv (flat) database

It's all in data/birthdays.csv :

  • username and dob are mandatory,
  • username must be unique
  • dob is in format YYYY-MM-DD

Command line

If your are using default csv file (data/birthdays.csv), just run :

mvn exec:java -DgiphyApiKey=YOUR_GIPHY_API_KEY -DslackWebhookUrl=YOUR_SLACK_WEBHOOK_URL

If you want to use a custom csv file use the fully qualified command line :

mvn exec:java -DcsvFileName=CSV_FILENAME_PATH -DgiphyApiKey=YOUR_GIPHY_API_KEY -DslackWebhookUrl=YOUR_SLACK_WEBHOOK_URL

How to get slack incoming webhook url

First, install the Incoming WebHooks app : https://slack.com/apps/A0F7XDUAZ-incoming-webhooks Configure it to target the birthdays channel Keep the url and keep it secret

Deployment instructions

You can set in up localy on your workstation, on a server but...the best way is to deploy i ton the cloud... and Travis CI can help, see dedicated section for that.

Tips

To better manage birthdays greetings, you can create a dedicated branch and cron job only on that branch ;-p ...hence you are ready to perform PR on the project.

Take care to schedule cron in the middle of the morning to get the best effect : it's muc more fun to get a live slack than to discover on when you arrive at the office : nothing beats the Slack "tac tac" with a punching GIF !

LinkedIn article

https://www.linkedin.com/pulse/birthdays-bots-slack-travis-ci-cron-jobs-all-free-fun-adrien-sales/

Acknowledgements

slack-birthday-bot's People

Contributors

adriens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.