OpenAI and LangChain: build and deploy a Slack AI agent
Build a Node.js Slack bot that researches new members, generates a 0 to 100 fit score with GPT-4, and saves results to PostgreSQL on Render.
Player not loading? Watch on YouTube
Ania Kubow builds a Slack AI agent in Node.js that researches new community members and scores their potential fit for a company's products. The workflow uses OpenAI through LangChain, stores analysis in PostgreSQL, and posts a summary to a private Slack channel. Render funded the course through a grant.
The tutorial covers project initialization, Slack Bolt socket mode, event subscriptions, API credentials and environment variables. The bot handles workspace joins and public channel joins; its channel handler skips direct messages and private channels. Research consists of fetching a company website title from a non-personal email domain and searching GitHub by the member's name. It takes the first matching GitHub result, so the workflow does not establish that the profile belongs to the member.
The instructor configures GPT-4 with a temperature of 0.3 and requests JSON containing a score from 0 to 100, observations and engagement suggestions. Failed analysis returns a fallback score of 50 with a manual review recommendation. The app saves results before posting to Slack, then records whether posting succeeded.
The final sections test the app locally and deploy it through a Render Blueprint YAML file. This setup depends on hosted APIs and a Render database. Its generated scores and inferred background details are model outputs, not verified assessments of members.