This product is archived. This means we no longer use or develop it.
A Slack app that pairs up participants for 1:1 conversations.
Each week, a cron job set up in GitHub Actions hits an endpoint:
POST /api/scheduler/run
This runs the Vercel Serverless Function defined by run.ts.
It accesses a database, which stores:
- installations (which contain Slack installation details, and references to AirTable bases with participants)
- meetings
- meeting feedbacks
For each installation, it gets participants and matches them up. It then finds them on Slack, creates a group DM and sends a message to that DM. It then records this as a new meeting.
When users click buttons in the message, events are triggered. These are handled in events.ts. Generally, these acknowledge the action, update the state of something in the database and send a follow-up message back to the channel.
Complete:
- Set up project with API
- Build db helper to safely use Airtable as a database
- Set up Slack OAuth
- Set up matcher basics
- Set up multi-tenant participant fetching
- State management, i.e. confirmed/completed
- Handle receiving meeting feedback
- Restrict participants to an Airtable view
- Send follow-ups if no response
- Deploy to Vercel
- Handle multiple installations on the same Slack workspace
- Trigger run for a single installation
Todo:
- nice to have: smarter matcher logic
- nice to have: time availabilities
(BlueDot Internal) Further documentation: https://www.notion.so/bluedot-impact/Networking-bot-89bec8d266884408839970b6d9512c62
- Clone this repository
- Install Node
- Install dependencies with
npm install
- Get access to the [Example] Slack networking bot base and create an Airtable personal access token with the scopes 'data.records:read', 'data.records:write', 'schema.bases:read', 'block:manage'.
- Set the environment variables in
.env.local
- Run the server with
npm start
So that OAuth and event callbacks to hit the right place, use localhost.run:
- Run
ssh -R 80:localhost:3000 [email protected]
(orssh -R 80:localhost:3000 [email protected]
if you want a longer lasting domain - requires free signup) - In the Slack console for '(local) networking bot':
- in OAuth settings, update the redirect URL to your lhr.life endpoint
- in Interactivity & Shortcuts update the request URL to your lhr.life endpoint
- In .env.local update the SLACK_REDIRECT_URI
You should then be able to use the app at your lhr.life url.
Data is stored in the Airtable base here: https://airtable.com/appnNmNoNMB6crg6I/tblzo9A4hjnxs8ezd/viwr3hvlKM7ebsf9v
This app is deployed using Vercel and uses an Airtable base as a database. API keys are stored safely in Vercel environment variables. GitHub Actions hits the scheduler endpoint.
To deploy a new version, simply commit to the master branch. GitHub Actions automatically handles CD, via npm run deploy:prod
.