Deploying mOperator to Vercel
This guide walks you through deploying mOperator to Vercel so your Slack bot is live 24/7. You have two options: click a button (easiest) or use the command line.
Option 1: Deploy Button (Fastest)
- Go to the mOperator GitHub README
- Click the "Deploy with Vercel" button
- Sign in to Vercel (or create a free account)
- Review the environment variables that will be pre-filled
- Add any additional env vars you need (Salesforce, Linear, GitHub)
- Click "Deploy"
- Wait 2–5 minutes for deployment to finish
- You'll get a live URL:
https://your-project-name.vercel.app
That's it! Skip to "Update URLs and Redeploy" below.
Option 2: Manual Deploy with Vercel CLI
1. Install Vercel CLI
npm install -g vercel
Or use npx (no installation needed):
npx vercel
2. Deploy
In your mOperator directory:
vercel
- This will:
- Ask you to link to a Vercel project (or create a new one)
- Deploy your code to Vercel
- Give you a live URL
3. Add Environment Variables
After deployment, set up environment variables in Vercel:
- Option A: Web Dashboard
- Go to vercel.com/dashboard
- Click your mOperator project
- Go to Settings → Environment Variables
- Add each variable:
AI_GATEWAY_API_KEY = (your AI Gateway key)AI_PROVIDER = anthropic (or openai)SLACK_BOT_TOKEN = xoxb-...- Other integrations as needed (Salesforce, Linear, GitHub)
- Click "Save" after each
Option B: CLI
vercel env add
Follow the prompts to add variables.
4. Redeploy with Variables
After adding env vars, redeploy:
vercel
This ensures the new variables are active.
Update URLs for Slack and Salesforce
Now that you have a live URL, update your Slack and Salesforce configurations.
Update Slack App URLs
- Go to api.slack.com/apps
- Select your mOperator app
- Go to "Event Subscriptions"
- Update Request URL to:
https://your-vercel-domain.vercel.app/api/slack
- Go to "Slash Commands"
- Click "/moperator" to edit
- Update Request URL to:
https://your-vercel-domain.vercel.app/api/slack/commands
- Click "Save" on each
Update Salesforce Callback URL
- Go to Salesforce Setup → App Manager
- Find your "mOperator" app
- Click the dropdown → "Edit"
- Update Callback URL to:
https://your-vercel-domain.vercel.app/api/integrations/salesforce/callback
- Click "Save"
- You may need to re-run the OAuth flow (see Setup Salesforce)
Optional: Set Up Redis for Slash Command State
If you want mOperator to remember command state across requests (recommended for reliability):
- Go to upstash.com
- Sign up (free tier available)
- Create a Redis database
- Copy the REST API URL and REST API Token
- Add to Vercel env vars:
UPSTASH_REDIS_REST_URL=https://...
UPSTASH_REDIS_REST_TOKEN=...
- Redeploy:
vercel
Verify Deployment
Once everything is set up:
- Go to your Slack workspace
- Test the bot:
@mOperator hello
- Test slash commands:
/moperator help
- Test integrations:
@mOperator show me recent commits
If all responses work, you're live!
View Logs
If something breaks, check Vercel logs:
vercel logs
- Or use the web dashboard:
- Go to vercel.com/dashboard
- Click your project
- Go to "Deployments"
- Click the latest deployment
- Go to "Logs" to see errors
Common Issues
"Request URL failed to validate"
- Make sure your Vercel deployment is live (check the URL in a browser)
- Verify the URL is exactly correct in Slack settings
- Wait a few seconds and try again
"Bot doesn't respond"
- Check that `SLACK_BOT_TOKEN` is set in Vercel env vars
- Verify the Event Subscriptions URL is correct
- Check Vercel logs for errors
"Salesforce queries fail"
- Make sure `SALESFORCE_ACCESS_TOKEN` and `SALESFORCE_INSTANCE_URL` are set
- Verify the callback URL in Salesforce matches your Vercel domain
- You may need to re-authorize (run OAuth flow again)
"Changes aren't showing up"
- Env vars only apply on redeployment
- After changing an env var, run:
vercel
- Wait for the new deployment to complete
Updating mOperator
To get the latest version:
git pull origin main
vercel
This pulls the latest code and redeploys.
Cost
- Vercel has a free tier:
- 100 GB bandwidth per month
- Unlimited deployments
- Perfect for small teams
As you grow, Vercel's paid tiers start at $20/month.
Next Steps
- Invite team members to use the bot
- Share the setup guides for Salesforce, Linear, or GitHub as needed
- Set up admin controls by adding user IDs to
ADMIN_SLACK_USER_IDS - Monitor Vercel logs if issues arise