/insights-from-team-survey

Create insights from team survey and send Slack message with information

Primary LanguagePython

Insights from team survey

More information here: https://openbb.co/blog/how-we-used-openai-to-extract-insights-from-team-surveys

Extract insights from the team survey data into a Slack message using OpenAI.

Example

Example

This is what OpenBB's team survey data looks like:

Screenshot 2023-07-04 at 7 43 09 PM

$ python extract_insights_from_last_team_survey.py 

This is what you can expect for output in case of the script running successfully.

Loading environment variables...

Loading team survey data from Airtable...

Processing data from Airtable...

Extracting insights from team survey data...

Sending insights to Slack through a message...

SUCCESS: Message posted to Didier Lopes

Example

Installation

  1. Create new environment:
conda create --name insights
  1. Activate new environment:
conda activate insights
  1. Install python and poetry
conda install python poetry
  1. Let poetry install all dependencies
poetry install

Set your variables

Create an .env file and copy-paste:

SLACK_WEBHOOK_URL='REPLACEME'
AIRTABLE_API_KEY = 'REPLACEME'
AIRTABLE_BASE_ID = 'REPLACEME'
AIRTABLE_TABLE_NAME = 'REPLACEME'
OPENAI_API_KEY = "REPLACEME"

with REPLACEME being replaced by your own keys extracted from Slack, Airtable and OpenAI, respectively. Note that for Airtable you will need details from the table you are trying to access information from.