A serverless Discord bot that integrates with Plane project management platform. This bot runs on Cloudflare Workers using the Discord Interactions Endpoint (Webhooks), making it highly scalable, cost-effective, and low-latency.
-
📝 Issue Management
- Create issues with custom priorities and states
- View issue details with rich embeds
- Get lists of issues filtered by status
- Upload files to issues
-
📊 AI-Powered Personal Summaries
- New:
/person_daily_summarycommand - Rich Discord Embed output with sections for Completed, In Progress, Comments, and Cycles.
- Surgical user-level filtering (only shows YOUR work).
- Powered by Google's Gemini AI.
- New:
-
⚡ Serverless Architecture
- Runs on Cloudflare Workers.
- No persistent server required.
- Uses Discord Interactions (Webhooks).
- Handles long-running AI tasks via Deferred Responses to prevent timeouts.
- Node.js >= 18.0.0
- Cloudflare Account with
wranglerCLI installed - A Discord Bot / Application with a channel for daily summaries
- A Plane account with API access
- Google Gemini API key (for summaries)
git clone https://github.com/yourusername/plane-discord-bot.git
cd plane-discord-bot
npm install- Go to Discord Developer Portal.
- Create a new application.
- In the General Information tab, copy your Application ID and Public Key.
- In the Bot tab, generate a Token.
Cloudflare Workers use secrets for sensitive data. You can set them using Wrangler:
# Required for Discord
npx wrangler secret put DISCORD_TOKEN
npx wrangler secret put DISCORD_PUBLIC_KEY
npx wrangler secret put DISCORD_APPLICATION_ID
# Required for Plane
npx wrangler secret put PLANE_API_KEY
npx wrangler secret put WORKSPACE_SLUG
# Required for AI Summaries
npx wrangler secret put GOOGLE_GENERATIVE_AI_API_KEY
# Required for Daily Summaries
npx wrangler secret put DAILY_SUMMARY_CHANNEL_IDNon-sensitive variables are managed in wrangler.toml:
[vars]
PLANE_BASE_URL = "https://plane.superalign.ai/api/v1"
GEMINI_MODEL = "gemini-2.5-flash"
GEMINI_TEMPERATURE = 0.3Before running the worker, you must register the slash commands with Discord:
- Create a
.envfile with your Discord credentials:DISCORD_TOKEN=your_discord_bot_token_here DISCORD_CLIENT_ID=your_discord_application_id_here
- Register the commands:
npm run register-commands
To test locally, use wrangler dev and a tunnel like ngrok to expose your local port (default 8787) to Discord:
# Start local worker
npx wrangler dev --local --port 8787
# In another terminal, start ngrok
ngrok http 8787Copy the ngrok URL and paste it into the Interactions Endpoint URL field in your Discord Developer Portal (App -> General Information). Use https://your-ngrok-url.com.
npm run publishOnce deployed, update the Interactions Endpoint URL in Discord to your worker's production URL (e.g., https://plane-bot.yourname.workers.dev).
| Command | Description | Parameters |
|---|---|---|
/person_daily_summary |
Get personalized AI daily summary for a team member | person (required), date (optional), team (optional) |
/team_daily_summary |
Get team work summary for a specific project | project (required), date (optional) |
After setting up environment variables, register the slash commands:
npm run register-commandsThis will register the commands with Discord and make them available in your server.
The bot automatically sends detailed daily team summaries to a configured Discord channel:
- Trigger: Daily at 8:00 PM IST (2:30 PM UTC)
- Content: Detailed team activity summaries for all active projects (same format as
/team_daily_summarycommand) - Channel: Configured via
DAILY_SUMMARY_CHANNEL_IDenvironment variable
📊 Team Summary - Radar (2025-01-07)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Radar
Sprint 1 -> 75% completed
<avik.mukherjee>
Tasks/SubTasks Done
• Implement user authentication
• Update API documentation
Tasks/SubTasks in Progress
• Fix mobile responsiveness (In Review)
• Code review (In Progress)
To enable scheduled summaries, set the DAILY_SUMMARY_CHANNEL_ID in your Cloudflare Worker secrets.
src/server.js: Main Cloudflare Worker entry point (handles routing & verification).src/services/personDailySummary.js: Logic for fetching and summarizing personal activity.src/services/planeApiDirect.js: The direct API client for interacting with Plane.wrangler.toml: Worker configuration and environment variables.src/deploy-commands.js: Script to register slash commands with Discord.
- "Invalid Request Signature": Ensure
DISCORD_PUBLIC_KEYis correct in your secrets. - "Application did not respond": The bot uses Deferred Responses. Ensure the Worker has enough time to finish background tasks (up to 30s).
- AI Key Missing: Ensure
GOOGLE_GENERATIVE_AI_API_KEYis correctly set viawrangler secret put.
MIT License.