Chat SDK Example
This is an example Next.js app using chat.
Webhook Endpoints
/api/webhooks/slack- Slack events/api/webhooks/teams- Microsoft Teams events/api/webhooks/gchat- Google Chat events/api/webhooks/discord- Discord interaction events/api/webhooks/telegram- Telegram bot updates/api/webhooks/github- GitHub PR comment events/api/webhooks/linear- Linear issue comment events
Features
- AI Mode- Mention the bot with "AI" to enable AI assistant mode (uses Claude)
- Rich Cards - Interactive cards with buttons
- Reactions - React to bot messages and it reacts back
- DM Support- Say "DM me" to get a direct message
Configuration
Set the following environment variables to enable each platform:
Slack
SLACK_CONNECTOR=slack/your-connector # plus VERCEL_OIDC_TOKEN (run `vercel env pull`)
Microsoft Teams
TEAMS_APP_ID=... TEAMS_APP_PASSWORD=...
Google Chat
GOOGLE_CHAT_CREDENTIALS={"type":"service_account",...}Discord
DISCORD_BOT_TOKEN=... DISCORD_PUBLIC_KEY=... DISCORD_APPLICATION_ID=...
Telegram
TELEGRAM_BOT_TOKEN=... TELEGRAM_WEBHOOK_SECRET_TOKEN=...
GitHub
GITHUB_CONNECTOR=github/your-connector # plus VERCEL_OIDC_TOKEN (run `vercel env pull`)
Linear
LINEAR_CONNECTOR=linear/your-connector # plus VERCEL_OIDC_TOKEN (run `vercel env pull`)