N2B Scheduler - Notion to Bluesky Auto Poster
An automated scheduler that reads posts from a Notion database and publishes them to Bluesky at scheduled times.
See it in action, https://bsky.app/profile/nucky.bsky.social
- 📅 Schedule Bluesky posts from Notion database
- 🤖 Automatic posting via cron job (every 15 minutes)
- 📊 Status tracking (Draft → Scheduled → Posted)
- 🔗 Stores posted URLs back to Notion
- 📸 Media support - Upload images with your posts (up to 4 images per post)
Your database needs these fields:
- Title (Title field) - Post title/identifier
- Text (Rich Text field) - The post content
- Scheduled Date (Date field with time) - When to post
- Status (Select field) - Options: Draft, Scheduled, Posted
- URL (URL field) - Stores the Bluesky post URL after posting
- Media (Files & media field) - Upload images (JPG, PNG, GIF, WebP)
Set these in your Val Town environment:
NOTION_TOKEN - Your Notion integration token
NOTION_DATABASE_ID - Your database ID
BLUESKY_HANDLE - Your Bluesky handle (e.g., user.bsky.social)
BLUESKY_APP_PASSWORD - Your Bluesky app password
3. Notion Integration Permissions
Make sure your Notion integration has access to:
- Read content
- Update content
- Read database structure
/scheduler.ts - Main cron job that checks and posts
/lib/notion.ts - Notion API integration
/lib/bluesky.ts - Bluesky posting functionality
/lib/types.ts - TypeScript interfaces
- Cron job runs every 15 minutes
- Queries Notion for posts with status "Scheduled" and due date/time
- Posts to Bluesky
- Updates Notion record with "Posted" status and Bluesky URL
- Create a new row in your Notion database
- Set the Text field with your post content
- Optional: Upload images to the Media field (supports JPG, PNG, GIF, WebP)
- Set the Scheduled Date field with when you want it posted
- Set Status to "Scheduled"
- The cron job will automatically post it at the scheduled time