Introduction
This guide covers creating and deploying Slack bots on Shard Cloud.Creating a Slack App
Create App
Go to Slack API - Your Apps and click
“Create New App”.
Get Credentials
In “Basic Information”, note your Signing Secret. In “OAuth &
Permissions”, add scopes like
chat:write, app_mentions:read,
commands.Creating Your Bot
Environment Variables
Set these in the Shard Cloud dashboard:SLACK_SIGNING_SECRET: Your app’s signing secretSLACK_BOT_TOKEN: Your bot’s OAuth token
Shard Cloud Configuration
.shardcloud
The
SUBDOMAIN is required for Slack to send events to your bot via webhooks.Configuring Slack Events
After deployment, configure your Request URLs in Slack:- Event Subscriptions: Enable and set URL to
https://my-slack-bot.shardweb.app/slack/events - Slash Commands: Set URL to
https://my-slack-bot.shardweb.app/slack/events
Deploying
Prepare Your Files
Ensure you have: - Your bot code file -
package.json or requirements.txt.shardcloud
Upload to Shard Cloud
Go to Shard Cloud Dashboard and
upload.
Additional Resources
Troubleshooting
Events not received
Events not received
- Verify your Request URL is correct - Ensure your app is running and accessible - Check that the signing secret matches
URL verification failed
URL verification failed
Make sure your bot is running before verifying the URL in Slack.
