Automatically forward Notion webhook events to Discord channels with beautifully formatted embeds.
👆 Click to deploy your own private instance to Cloudflare Workers instantly.
A lightweight Cloudflare Worker that bridges Notion and Discord. When Notion sends webhook events (from database updates, button actions, etc.), this bot automatically formats and sends them to your Discord channels as rich embeds.
- 🔄 Real-time Sync: Automatically forwards Notion webhook events to Discord.
- 🎨 Rich Embeds: Beautifully formatted Discord embeds supporting all property types.
- 🔗 Interactive: Direct links to Notion pages with clickable buttons.
- 🚀 Serverless: Built on Cloudflare Workers for zero-maintenance, global edge deployment.
Choose the method that best fits your needs.
Use our pre-deployed worker without any setup.
- Invite the Bot: Click here to invite the bot to your Discord server.
- Generate URL: Visit notion-to-discord-bot.naas.workers.dev to generate your webhook URL.
- Configure Notion: Use the generated URL in your Notion database settings.
Host your own instance on Cloudflare Workers for full control and custom domains.
- Click the "Deploy to Cloudflare" button at the top of this page.
- Follow the on-screen instructions to authorize Cloudflare Workers.
- When prompted for Secret Variables, enter your Discord Bot Token as
DISCORD_BOT_TOKEN.
- Clone the repository:
git clone https://github.com/nakanoasaservice/notion-to-discord-bot.git cd notion-to-discord-bot pnpm install - Set your Discord Bot Token:
wrangler secret put DISCORD_BOT_TOKEN
- Deploy:
pnpm run deploy
Note for Self-Hosters: You will need to create your own Discord Application and Bot in the Discord Developer Portal to get a Bot Token.
Follow these steps to connect Notion to Discord.
- Get Channel ID:
- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode).
- Right-click the channel you want notifications in and select "Copy Channel ID".
- Ensure Permissions: Make sure the bot has
Send Messagespermissions in that channel.
✨ Recommended: Webhook URL Generator Visit notion-to-discord-bot.naas.workers.dev to easily generate your webhook URL.
Manual Construction:
Construct your Webhook URL using one of the formats below.
For Public Instance Users:
https://notion-to-discord-bot.naas.workers.dev/{DISCORD_CHANNEL_ID}?title={OPTIONAL_TITLE}
For Self-Hosted Users:
https://your-worker-name.your-subdomain.workers.dev/{DISCORD_CHANNEL_ID}?title={OPTIONAL_TITLE}
Parameters:
{DISCORD_CHANNEL_ID}: The ID you copied from Discord.title(optional): Custom title for the embed (defaults to the Notion page title).
Example:
https://notion-to-discord-bot.naas.workers.dev/1234567890123456789?title=Task%20Updates
Where to set this URL:
- Database Webhooks: Settings → Connections → Webhooks → Add webhook
- Button Actions: Configure a button to send a webhook to this URL
- Other Integrations: Any service that supports Notion webhooks
This bot supports formatting for all major Notion property types:
- ✅ Text: Title, Rich Text, URL, Email, Phone Number
- ✅ Select: Select, Multi-select, Status
- ✅ Date: Date, Created Time, Last Edited Time
- ✅ People: People, Created By, Last Edited By
- ✅ Numbers: Number, Formula (number)
- ✅ Boolean: Checkbox, Formula (boolean)
- ✅ Relations: Relation, Rollup
- ✅ Files: Files (internal & external)
- ✅ Other: Unique ID, Verification, Button
If you want to contribute or modify the code:
# Install dependencies
pnpm install
# Start development server
pnpm run start
# Run tests
pnpm run test
# Type checking & Linting
pnpm run check-types
pnpm run check:fixsrc/index.ts: Main Hono application & Discord integrationsrc/formatter.ts: Notion property formatting logicsrc/client.tsx: Client-side code
Contributions are welcome! Please feel free to submit a Pull Request.
This project is private and not licensed for public use.
- Built with Hono
- Powered by Cloudflare Workers