AI-powered thought capture from Slack to Notion. Drop thoughts into a Slack channel and they're automatically classified and filed to the right Notion database.
- Smart Classification: Uses AI to categorize thoughts into People, Projects, Ideas, or Admin
- Automatic Filing: Creates structured records in Notion with extracted fields
- Fix Command: Reply
fix: [category]to correct misclassifications - AI Digests: Daily and weekly summaries with actionable insights
- Scheduled Delivery: Automatic digest delivery at configurable times
- Post a thought to your designated Slack channel
- The bot classifies it using AI and extracts relevant fields
- A record is created in the appropriate Notion database
- You get a confirmation reply with a link to the Notion page
- Node.js 20+
- A Slack workspace where you can install apps
- A Notion workspace
- An Anthropic API key
git clone https://github.com/brentrockwood/2b.git
cd 2b
npm install- Go to api.slack.com/apps and create a new app
- Enable Socket Mode and generate an App Token
- Add these Bot Token Scopes:
channels:history- Read messageschat:write- Send repliesapp_mentions:read- Respond to @mentions
- Install to Workspace and copy the Bot Token
- Copy the Signing Secret from Basic Information
- Go to notion.so/my-integrations
- Create a new integration and copy the token
- Share your Notion databases with the integration
cp .env.example .env
# Edit .env with your credentialsnpx tsx scripts/create-databases.tsThis creates the required databases and outputs the IDs to add to your .env.
Development:
npm run devProduction (Docker):
docker compose up -dJust post to your inbox channel:
Had coffee with John, he's moving to Seattle next month
The bot will classify this as People and create a record with:
- Name: John
- Context: Had coffee, moving to Seattle
- Follow-ups: Check in about the move
Reply in the thread:
fix: projects
Valid categories: people, projects, ideas, admin
Mention the bot:
@Second Brain digest daily
@Second Brain digest weekly
| Variable | Description | Default |
|---|---|---|
SCHEDULE_ENABLED |
Enable automatic digests | true |
SCHEDULE_DAILY_CRON |
Daily digest schedule | 0 8 * * * (8am) |
SCHEDULE_WEEKLY_CRON |
Weekly digest schedule | 0 8 * * 1 (Monday 8am) |
SCHEDULE_TIMEZONE |
Timezone for schedules | America/New_York |
ANTHROPIC_MODEL |
AI model to use | claude-sonnet-4-20250514 |
npm run dev # Run with hot reload
npm run build # Compile TypeScript
npm run lint # Run ESLint
npm test # Run testsMIT