Back to Documentation
Setting Up Webhooks
Setting Up Webhooks
Webhooks enable automatic syncing whenever you push changes to GitHub, keeping your Notion pages up-to-date without manual intervention.
How Webhooks Work
- You push changes to your GitHub repository
- GitHub sends a webhook event to mdsync.app
- mdsync.app verifies the webhook signature for security
- The sync is automatically triggered for affected synchronizations
- Your Notion pages are updated automatically
Plan Availability
- Free Plan: ❌ Webhooks not available (manual sync only)
- Starter Plan: ✅ Automatic webhooks included
- Pro Plan: ✅ Automatic webhooks included
Automatic Setup
When you create a synchronization and enable webhooks, mdsync.app automatically:
- Creates a webhook in your GitHub repository
- Configures it to trigger on
pushevents - Generates and stores a webhook secret for security
- Sets the webhook URL to point to mdsync.app's webhook endpoint
- Verifies the webhook is working correctly
Webhook Security
- Signature Verification: All webhooks are verified using HMAC SHA-256 signatures
- Secret Management: Webhook secrets are encrypted and stored securely
- URL Validation: Webhook URLs are automatically updated if your app URL changes
Manual Setup (if needed)
If automatic setup fails, you can manually create the webhook:
- Go to your GitHub repository → Settings → Webhooks
- Click "Add webhook"
- Payload URL: Use the webhook URL from your sync settings (format:
https://mdsync.app/api/webhooks/github) - Content type: Select "application/json"
- Events: Select "Just the push event"
- Secret: Use the webhook secret from your sync settings
- Click "Add webhook"
Managing Webhooks
- View Status: Check webhook status in your sync settings
- Update URL: Webhooks are automatically updated when needed
- Regenerate Secret: Contact support if you need to regenerate a webhook secret
- Delete: Webhooks are automatically deleted when you delete a synchronization
Troubleshooting
If webhooks aren't working:
- ✅ Check webhook delivery status in GitHub (Settings → Webhooks → Recent Deliveries)
- ✅ Verify the webhook URL is correct and accessible
- ✅ Ensure the webhook secret matches in both GitHub and mdsync.app
- ✅ Check your mdsync.app dashboard for sync errors
- ✅ Verify you're on a Starter or Pro plan
- ✅ Ensure you have admin access to the repository
Webhook Events
Currently, mdsync.app listens for:
- Push events: Triggers sync when code is pushed to the repository
- Pull request events
- Branch creation/deletion
- Custom webhook events