This is a Slack Agent template built with Bolt for JavaScript (TypeScript) and the Nitro server framework.
This is a Slack Agent template built with Bolt for JavaScript (TypeScript) and the Nitro server framework.
Create a Slack App
slack create --template https://github.com/vercel-partner-solutions/slack-agent-template.git
*Paste your manifest code here*
(within the JSON tab) and click Next.env
file under SLACK_SIGNING_SECRET
.env
file under SLACK_BOT_TOKEN
AI_GATEWAY_API_KEY
to your .env
file. You can get one hereVERCEL_OIDC_TOKEN
to authenticate with the Vercel AI Gateway. More info hereslack app link
Local
when promptedconfig.json
file under /.slack/config.json
and update your manifest source to local
{"manifest": {"source": "local"},"project_id": "<project-id-added-by-slack-cli>"}
Start your local server with automatic tunneling using the pnpm dev:tunnel
command. You can also use the generic slack run
command if you do not want automatic tunneling and manifest updates. If prompted, select the workspace you'd like to grant access to. Select yes
when asked Update app settings with changes to the local manifest?
Open your Slack workspace and add your new Slack Agent to a channel. Your Slack Agent should respond whenever it's tagged in a message or sent a DM
*Paste your manifest code here*
(within the JSON tab) and click Next and CreateSLACK_SIGNING_SECRET
SLACK_BOT_TOKEN
in the environment variables dropdown/api/events
path is preservedmanifest.json
manifest.json
is a configuration for Slack apps. With a manifest, you can create an app with a pre-defined configuration, or adjust the configuration of an existing app.
/server/app.ts
/app.ts
is the entry point of the application. This file is kept minimal and primarily serves to route inbound requests.
/server/listeners
Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so /listeners/shortcuts
handles incoming Shortcuts requests, /listeners/views
handles View submissions and so on.
/server
This is your nitro server directory. Inside you have an api
folder that contains a events.post.ts
file. This matches the request URL's defined in your manifest.json
file. Nitro uses file based routing for incoming requests. You can learn more about this here.
This is a Slack Agent template built with Bolt for JavaScript (TypeScript) and the Nitro server framework.
This is a Slack Agent template built with Bolt for JavaScript (TypeScript) and the Nitro server framework.
Create a Slack App
slack create --template https://github.com/vercel-partner-solutions/slack-agent-template.git
*Paste your manifest code here*
(within the JSON tab) and click Next.env
file under SLACK_SIGNING_SECRET
.env
file under SLACK_BOT_TOKEN
AI_GATEWAY_API_KEY
to your .env
file. You can get one hereVERCEL_OIDC_TOKEN
to authenticate with the Vercel AI Gateway. More info hereslack app link
Local
when promptedconfig.json
file under /.slack/config.json
and update your manifest source to local
{"manifest": {"source": "local"},"project_id": "<project-id-added-by-slack-cli>"}
Start your local server with automatic tunneling using the pnpm dev:tunnel
command. You can also use the generic slack run
command if you do not want automatic tunneling and manifest updates. If prompted, select the workspace you'd like to grant access to. Select yes
when asked Update app settings with changes to the local manifest?
Open your Slack workspace and add your new Slack Agent to a channel. Your Slack Agent should respond whenever it's tagged in a message or sent a DM
*Paste your manifest code here*
(within the JSON tab) and click Next and CreateSLACK_SIGNING_SECRET
SLACK_BOT_TOKEN
in the environment variables dropdown/api/events
path is preservedmanifest.json
manifest.json
is a configuration for Slack apps. With a manifest, you can create an app with a pre-defined configuration, or adjust the configuration of an existing app.
/server/app.ts
/app.ts
is the entry point of the application. This file is kept minimal and primarily serves to route inbound requests.
/server/listeners
Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so /listeners/shortcuts
handles incoming Shortcuts requests, /listeners/views
handles View submissions and so on.
/server
This is your nitro server directory. Inside you have an api
folder that contains a events.post.ts
file. This matches the request URL's defined in your manifest.json
file. Nitro uses file based routing for incoming requests. You can learn more about this here.