DEV Community

Discussion on: How We Built a Slack Bot for Time Tracking with Ruby on Rails and Vue.js

Collapse
 
richardisred profile image
Richy

Hi, I'm looking to install timebot for my team and followed all the instructions but I did not manage to make it work. Would it be possible to maybe release a video or a more detailed task list for beginners to manage installing the bot? Thank you for your impressive work, hope to get in touch !

Collapse
 
codicacom profile image
Codica

Hi Richy!

Thanks for your interest and feedback!

Can you tell us more about what issues you have? We need more details to be able to help. Have you followed our tutorial? (github.com/codica2/timebot#how-to-...)

We can create a more detailed guide, just need to know which part of the process causes difficulties.

Please let us know :)

Collapse
 
richardisred profile image
Richy • Edited

Thank you so much for your answer.

I have indeed followed the instructions. I tried to install the bot on Heroku. I successfully deployed the code from github, but I don't know where to fetch the "slack_token". Is it the same as the bot token (TIMEBOT_APP_TOKEN=slack_timebot_app_token)?

Once I have set all the variables correctly in the .env file and created the app + bot on slack, am I supposed to do something else to connect everything?

Regarding the interactive components, I can see that I am supposed to write "your_domain_name.com/api/v1/slack/..." in the URL field. Does it mean that I have to do something on Heroku ? or should I just write "https://(myheroku).com/api/v1/slack/submission"?

As you understood, I think a step by step tutorial specifically made for Heroku would be super helpful.

Thank you again !

Thread Thread
 
codicacom profile image
Codica

Hey Richy,

Thanks for the details!

Our dev team will look into this and we'll get back to you.

Thread Thread
 
codicacom profile image
Codica • Edited

Hey!

There have been changes to Slack API, this is why you have troubles.

Here's how you can make it work:

Step 1. Add this file in your project: config/secrets.yml
production:
secret_key_base: <%= ENV['SECRET_KEY'] %>

Step 2. Considering your question: "I don't know where to fetch the "slack_token". Is it the same as the bot token (TIMEBOT_APP_TOKEN=slack_timebot_app_token)?"
Yes, you are right.

Because of changes to Slack API, now you need to get it like this: github.com/slack-ruby/slack-ruby-c...

Step 3. Clone the project github.com/codica2/vue-timebot

In config/dev.env.js fill BASE_API with your Heroku app URL.
Run 'yarn' && 'yarn dev'.

Step 4. Create new admin via heroku console (Admin.create(email: 'your_email', password: 'your_password')).

Please let us know of the result :)

P.S. We are planning to create an updated version considering all the changes with Slack API, however, we don't have a timeline for this at the moment.

Thread Thread
 
richardisred profile image
Richy • Edited

Thank you so much for your answer. Unfortunately I did not manage to make it work... The command still doesn't work on slack, I am making a mistake at some point.

Would you consider making a full step-by-step tutorial including those new instructions ?

Thread Thread
 
codicacom profile image
Codica

Sorry to hear that!

Okay, we'll make a tutorial considering all the changes, however, this will take time - we don't have free resources at the moment.

We would say, this can take at least a couple of weeks.

Will keep you updated!

Thread Thread
 
richardisred profile image
Richy

Again, thank you so much, can't wait to see it !

Thread Thread
 
richardisred profile image
Richy

Hi, just a reminder that I'm still very interested to get more instructions to install the bot !