This is an example of how to deploy a Slack Bolt app with ChatGPT using NextJS. By leveraging The Vercel Serverless Platform, one can quickly build a Slack App and deploy for free. Thanks Simon Liang for his tutorial here.
- Slack workspace
- ChatGPT account
- Create a Slack app from manifest.json file
- Install app to your workspace
- After deployment, update Request URL in Event Subscriptions
- Method 1: Mention app in message with your prompt.
For example: @AI Assistant write a promise function in javascript.
- Method 2: Send your prompt to app messages directly
The execution timeout for serverless functions is limited to 10s in Vercel's free plan. To avoid this limitation, please consider upgrading to a paid plan or deploying to your own server.