A project made in Ruby where I made a BOT using Slack Web API and Google Calendar API to automatically send a message on Slack with the upcoming events present on the users' Calendar
How to configure Slack APP and Google Calendar API
- Ruby
- Slack Web API
- HTTParty
- Google API Ruby Client
Install git following the instructions available at Git
Clone the repository typing the command below on your preferred terminal
git clone https://github.com/marcelomaidden/ruby-capstone-bot/
After you have cloned the repository, enter the directory typing
cd ruby-capstone-bot
Install ruby following the instructions available at Ruby
After that run bundle to install all needed Ruby packages
bundle install
https://www.loom.com/share/4b442db4c7b7487682305a6db1224532?sharedAppSource=personal_library
https://www.loom.com/share/e26b55c4f87847e686dac077b92de2ef?sharedAppSource=personal_library
https://www.loom.com/share/ba1bc757304f419eb7ccc5e10ea2e41e?sharedAppSource=personal_library
-
Add workspace to Slack
- more information on Slack workspace
-
Create app on Slack API in your new workspace
-
Add features and functionalities listed above in order for it to work properly:
- Bots
- Permissions
-
Install your app to your workspace
-
Add Bot Token Scopes
- Scopes
- users:read
- usergroups:read
- channels:history
- channels:read
- chat:write
- chat:write.public
- groups:history
- im:history
- mpim:history
- Scopes
-
Invite ruby-capstone-bot by running the command below in a Slack conversation
/invite ruby-capstone-bot
-
Mention @ruby-capstone-project on a message
@ruby-capstone-bot hello
- Turn on the Google Calendar API here
After that, place credentials.json and token.yaml files on the root directory from the project
export BOT_USER_OAUTH_ACCESS_TOKEN='string_token_from_bot_oauth_slack'
setx /m BOT_USER_OAUTH_ACCESS_TOKEN='string_token_from_bot_oauth_slack'
More information click here
BOT_USER_OAUTH_ACCESS_TOKEN=$BOT_USER_OAUTH_ACCESS_TOKEN bundle exec ruby bin/run.rb
In order to test our project run:
bundle exec rspec --format doc
Marcelo Araújo
- GitHub: @marcelomaidden
- Twitter: @marcelomaidden
- LinkedIn: Marcelo Fernandes de Araújo
- Ruby creators
- Rspec project
- Slack API
- Google API
Contributions, issues, and feature requests are welcome!
Give a ⭐️ if you like this project!
This project is MIT licensed.