Build an AI-powered Slackbot with Node.js and Vercel Functions.
This is a Slackbot you can ask questions and get answers from OpenAI's GPT model.
After completing the setup instructions below, you will have the following .env
file in your project for testing locally, and the same environment variables added on Vercel:
OpenAI API Key
OPENAI_API_KEY=SLACK_BOT_TOKEN=SLACK_SIGNING_SECRET=SLACK_ADMIN_MEMBER_ID=
OPENAI_API_KEY
.Go to Slack API Apps Page:
app_mentions:read
channels:history
chat:write
commands
SLACK_BOT_TOKEN
SLACK_SIGNING_SECRET
SLACK_ADMIN_MEMBER_ID
.After successfully deploying the app, go to Slack API Apps Page and select your app:
https://<your-vercel-app>.vercel.app/api/events
app_mention
channel_created
Use the Vercel CLI and localtunnel to test out this project locally:
pnpm i -g vercelpnpm vercel dev --listen 3000 --yes
npx localtunnel --port 3000
Make sure to modify the subscription URL to the localtunnel
URL.
Build an AI-powered Slackbot with Node.js and Vercel Functions.
This is a Slackbot you can ask questions and get answers from OpenAI's GPT model.
After completing the setup instructions below, you will have the following .env
file in your project for testing locally, and the same environment variables added on Vercel:
OpenAI API Key
OPENAI_API_KEY=SLACK_BOT_TOKEN=SLACK_SIGNING_SECRET=SLACK_ADMIN_MEMBER_ID=
OPENAI_API_KEY
.Go to Slack API Apps Page:
app_mentions:read
channels:history
chat:write
commands
SLACK_BOT_TOKEN
SLACK_SIGNING_SECRET
SLACK_ADMIN_MEMBER_ID
.After successfully deploying the app, go to Slack API Apps Page and select your app:
https://<your-vercel-app>.vercel.app/api/events
app_mention
channel_created
Use the Vercel CLI and localtunnel to test out this project locally:
pnpm i -g vercelpnpm vercel dev --listen 3000 --yes
npx localtunnel --port 3000
Make sure to modify the subscription URL to the localtunnel
URL.