Skip to content

About

Serverless Function on Vercel to deploy the OpenAI Chat Bot for integration with Slack.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

Repository files navigation

Vercel AI Slack Bot

Screenshot of usage of this project

Note: The bot name and icon customizable at your Slack Apps.

Getting Started

Deploy on Vercel

Click on the button below to deploy this project on Vercel:

Deploy on Vercel

Fill in the Vercel Environment Variables retrieved from the following steps and click on "Deploy".

Environment Variables

OpenAI API Key

  • Create a new key on OpenAI API Keys and "Create new secret key", optionally naming the key.
  • Add the key to Vercel's environment variables as OPENAI_API_KEY.

Slack Bot Token & Signing Secret

Go to Slack API Apps Page:

  • Create new App
    • From Scratch
    • Name your app & pick a workspace
  • Go to Oauth & Permissions
    • Add the following scopes
      • app_mentions:read
      • channels:history
      • chat:write
      • commands
    • Copy Bot User OAuth Token
    • Add the token to Vercel's environment variables as SLACK_BOT_TOKEN
  • Install App to workspace
    • Basic Information --> Install Your App --> Install To Workspace
    • App Credentials --> Coppy Signing Secret
    • Add the secret to Vercel's environment variables as SLACK_SIGNING_SECRET

Enable Slack Events

After successfully deploying the app, go to Slack API Apps Page and select your app:

  • Go to Event Subscriptions and enable events.
  • Add the following URL to Request URL:
    • https://<your-vercel-app>.vercel.app/api/events
    • Make sure the URL is verified, otherwise check out Vercel Logs for troubleshooting.
    • If verified, make sure to click Save Changes.
  • After these changes, Slack may require reinstalling of the app.

About

Serverless Function on Vercel to deploy the OpenAI Chat Bot for integration with Slack.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages