Skip to content

Slack Bot which provides candidates live tracking of their current status towards becoming an UPE member

Notifications You must be signed in to change notification settings

wallace-lim/upe_slackbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UPE Slack Bot

Table of Contents

About

UPE Candidate Tracker is a slack bot used in University of California, Berkeley's Computer Science Honors Society, UPE - NU Chapter. Currently, this is a Flask application that uses Slack and Google Sheets API to enable quick access for candidates a list of their requirement on their track towards members.

Getting Started

Prerequisites

In order to correctly access our spreadsheet, we need to install a couple packages listed below

pip install flask
pip install gspread 
pip install oauth2client

Installing

Creating API endpoint to access the Google Sheets

  1. Go to Google Cloud Console and create a new project. Name the project as desired

  2. Go to the dashboard of the project by clicking the top left dropdown

    Google Cloud Console
  3. Search for Google Drive API using the search bar in the middle of the screen

  4. Enable Google Drive API and click Create Credentials on the left side

  5. Fill the form as indicated

    Google Drive API Credentials

    Google Drive API Credentials
  6. Download the JSON credentials file created and rename it into creds.json

  7. Search for Google Sheets API using the search bar and click Enable

  8. Copy the client email value from our JSON file and share it with the desired spreadsheet
    This should allow the API to have access to the sheet

Retrieve Slack Bot Information

  1. Go to Slack > Your Apps (top right) > Create New App
    Create a new app for the desired workspace

  2. Scroll to Verification Token and copy it

    Slack Credentials

  3. Click on Add featuress and functionality > Slash Commands > Create New Command
    Fill out the contents indicated

    Slack Slash Command

  4. Go back to the app's Basic Information > click Install App to Workspace

    Slack Installation

  5. Using a browser, go to the desired workspace and copy the Team ID specificed as

    https://app.slack.com/client/<team id here>/
    

Deployment

Flask App Deployment

Like any Flask app export the desired environment variables.
Fill in the values with the Slack IDs specified above

export SLACK_VERIFICATION_TOKEN=your-verification-token
export SLACK_TEAM_ID=your-team-id
export FLASK_APP=upe-tracker.py

Deploying on OCF Servers

See Berkeley OCF's docs on app hosting

General

Python (Flask)

Authors

  • Wallace Lim
  • Leon Ming

About

Slack Bot which provides candidates live tracking of their current status towards becoming an UPE member

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published