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.
In order to correctly access our spreadsheet, we need to install a couple packages listed below
pip install flask
pip install gspread
pip install oauth2clientCreating API endpoint to access the Google Sheets
-
Go to Google Cloud Console and create a new project. Name the project as desired
-
Go to the dashboard of the project by clicking the top left dropdown
-
Search for
Google Drive APIusing the search bar in the middle of the screen -
Enable Google Drive API and click
Create Credentialson the left side -
Fill the form as indicated
-
Download the JSON credentials file created and rename it into
creds.json -
Search for
Google Sheets APIusing the search bar and click Enable -
Copy the
client emailvalue 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
-
Go to Slack > Your Apps (top right) > Create New App
Create a new app for the desired workspace -
Scroll to
Verification Tokenand copy it -
Click on
Add featuress and functionality>Slash Commands>Create New Command
Fill out the contents indicated -
Go back to the app's
Basic Information> clickInstall App to Workspace -
Using a browser, go to the desired workspace and copy the
Team IDspecificed ashttps://app.slack.com/client/<team id here>/
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
See Berkeley OCF's docs on app hosting
- Wallace Lim
- Leon Ming



