/feedback-bot

Allows users to share one-to-one feedback via Slack.

Primary LanguageGoMIT LicenseMIT

Feedback Bot

screenshot 2019-03-07 19 00 26

Feedback Bot is an automated way of delivering and receiving one-to-one feedback over Slack.

The feedback format is encouraging and at the same time constructive (Good-Better-Best).

Usage:

  • Send feedback: Generate a feedback survey and send feedback to a user in your slack.

screenshot 2019-03-07 19 42 28

  • Receive all your feedback weekly or on request in CSV format.

screenshot 2019-03-07 19 42 10

  • Chat with the bot and do things such as:

    • Subscribe and unsubscribe from weekly feedback notifications.

    • Query feedback feedback by one or multiple parameters.

    • Delete feedback you have received.

Installation

1. Go to https://api.slack.com/apps and create a new App

2. Enable Incoming Webhooks and Interactive Components

3. Fork and clone the project

4. Create a PostgresQL database and name it feedback-bot-db

5. Create an .env file in the root of your project, with the following environment variables:

# Can be edited:
PORT=3001
DBNAME=feedback-bot

# Do not edit:
DBUSER=postgres
DBPASSWORD=postgres
DBHOST=feedback-bot-db
DBPORT=5432

# These are samples. Please get real keys from the slack API dashboard:
BOT_OAUTH_ACCESS_TOKEN=xoxb-11439472923-880521654032-Sx7Qv46ofo9XODBqAc9pQ5Cl
VERIFICATION_TOKEN=9BP11qDFQwPP6seaZQeE9QLC

You can get the BOT_OAUTH_ACCESS_TOKEN and VERIFICATION_TOKEN from the Slack Dashboard

6. Run the server:

  • Deploy to Heroku

Or:

  • Run using Docker docker-compose up, then Expose the local URL using Ngrok

7. Go to your Apps Interactive Components section and set the request URL to: your-app-url/events-endpoint

More

If you want to change the feedback type options in the surveys:

  1. Navigate to utils/attachments.go
  2. Navigate to the GenerateFeedbackSurvey()
  3. In dialogElement2 change the options to your liking.