Guides6 min read

Notion AI Bot Integration

Connect your AI chatbot to Notion. Query databases, create pages, and manage your workspace through OpenClaw or OpenClaw on your VPS.

Published: 27/01/2025

Overview

Connect your AI chatbot to Notion and manage your entire workspace through chat. Query databases, create pages, update tasks, and search your knowledge base - all by messaging your bot on Telegram or Discord.

What You Can Do

  • Query databases: "Show me all tasks due this week"
  • Create pages: "Create a meeting note for today's standup"
  • Update content: "Mark the API project as complete"
  • Search: "Find all notes about the marketing campaign"
  • Summarize: "Give me a summary of this week's meeting notes"

Architecture

Chat Message (Telegram/Discord)
    ↓
[Your VPS - OpenClaw]
    ↓
[AI understands intent]
    ↓
[Notion API]
    ↓
Results returned to chat

Setup Guide

Step 1: Create Notion Integration

  1. Go to notion.so/my-integrations
  2. Click "New integration"
  3. Name it "AI Bot"
  4. Select your workspace
  5. Copy the Internal Integration Token

Step 2: Grant Access to Pages

Important: Integrations can only access pages you explicitly share.

  1. Open each database/page you want the bot to access
  2. Click "..." menu → "Connections"
  3. Add your "AI Bot" integration

Step 3: Configure Your Bot

# Notion Integration
NOTION_ENABLED=true
NOTION_API_KEY=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Optional: Default database IDs
NOTION_TASKS_DATABASE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
NOTION_NOTES_DATABASE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
NOTION_PROJECTS_DATABASE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Step 4: Find Database IDs

  1. Open the database in Notion
  2. Click "Share" → "Copy link"
  3. Link format: notion.so/workspace/DATABASE_ID?v=...
  4. The DATABASE_ID is the 32-character string

Usage Examples

Query Tasks

You: "What tasks are due today?" Bot: "You have 3 tasks due today:

  1. Review PR #42 (High priority)
  2. Send weekly report (Medium priority)
  3. Update documentation (Low priority)"

Create Notes

You: "Create a note about the meeting with Sarah" Bot: "Created new page 'Meeting Notes - Sarah - Jan 27, 2026' in your Notes database. What would you like to add?"

You: "She agreed to the proposal. Next steps: send contract by Friday." Bot: "Updated the note with:

  • Outcome: Agreed to proposal
  • Action item: Send contract by Friday"

Search Workspace

You: "Find everything about the Q4 marketing campaign" Bot: "Found 7 related items:

  • 📄 Q4 Marketing Strategy (Page)
  • 📊 Campaign Metrics (Database)
  • ✅ Campaign Tasks (12 items)
  • 📝 3 meeting notes mentioning Q4 campaign"

Update Status

You: "Mark the API documentation task as done" Bot: "Updated 'API Documentation' - Status changed to Complete ✓"

Advanced Features

Natural Language Queries

The AI understands context:

You: "Show me John's tasks that are overdue" Bot: "John has 2 overdue tasks:

  1. Budget Review (3 days overdue)
  2. Client Feedback (1 day overdue)"

Database Filtering

# System prompt addition
NOTION_CONTEXT="User's Notion workspace includes:
- Tasks database with properties: Name, Status, Due Date, Assignee, Priority
- Projects database with: Name, Status, Client, Budget
- Notes database with: Title, Date, Tags, Related Project"

This helps the AI make accurate queries.

Templates

Create pages from templates:

You: "Create a new project page for 'Website Redesign'" Bot: "Created 'Website Redesign' project from your Project Template with:

  • Status: Planning
  • Created: Jan 27, 2026
  • Sections: Overview, Goals, Timeline, Budget, Team

What details would you like to add?"

Weekly Reviews

Automated summaries:

# Weekly review every Sunday at 7 PM
NOTION_WEEKLY_REVIEW=true
NOTION_REVIEW_TIME=19:00
NOTION_REVIEW_DAY=sunday

Bot sends Sunday evening: "📊 Weekly Review - Jan 20-26, 2026

Tasks:

  • Completed: 12
  • Added: 8
  • Overdue: 2

Projects:

  • Website Redesign: 60% → 75%
  • API Integration: Started

Notes Created: 5

Want me to help plan next week?"

Security Considerations

Principle of Least Privilege

Only share necessary pages with the integration:

✅ Share: Tasks, Notes, Projects
❌ Don't share: Finances, HR, Personal

Read vs Write Access

Configure integration capabilities:

  1. Go to your integration settings
  2. Under "Capabilities":
    • Read content ✓
    • Update content ✓ (if needed)
    • Insert content ✓ (if needed)

Audit Trail

Notion logs all API access in the audit log (Enterprise plan).

Configuration Options

Database Mappings

Tell the bot about your database structure:

NOTION_SCHEMA="
tasks:
  database_id: xxx
  properties:
    name: title
    status: select [To Do, In Progress, Done]
    due: date
    priority: select [Low, Medium, High]

notes:
  database_id: yyy
  properties:
    title: title
    date: date
    tags: multi_select
"

Custom Commands

NOTION_COMMANDS="
/tasks - Show today's tasks
/addtask [name] - Quick add task
/projects - List active projects
/note [content] - Quick capture note
"

Integration Patterns

Daily Task Sync

Morning briefing includes Notion tasks:

☀️ Good morning!

📋 **Today's Tasks (from Notion):**
1. Team standup - 10:00 AM
2. Review designs - High priority
3. Send proposal - Due 5 PM

Would you like to add anything?

Meeting Notes Workflow

  1. Before meeting: "Create meeting note for ABC Corp call"
  2. During: Send voice notes that get transcribed and added
  3. After: "Summarize today's meeting and create action items"

Project Updates

You: "Give me a status update on all active projects" Bot: "Active Projects Status:

  1. Website Redesign - 75% complete

    • On track for Feb 15 deadline
    • 3 tasks remaining
  2. Mobile App - 40% complete

    • Blocked: Waiting on API access
    • 8 tasks remaining
  3. Marketing Campaign - 90% complete

    • Launching Monday
    • Final review needed"

Troubleshooting

"Page not found" errors

  • Verify integration has access to the page
  • Check database ID is correct
  • Ensure API key is valid

Slow responses

  • Notion API can be slow with large databases
  • Consider caching frequent queries
  • Use specific filters to reduce data

Missing data

  • Check property names match exactly
  • Verify date formats
  • Ensure filters are correct

Comparison: Bot vs Notion AI

| Feature | Your Bot | Notion AI | |---------|----------|-----------| | Chat interface | Telegram/Discord | Notion app only | | Voice support | Yes | No | | Cross-app integration | Yes (Home, Tasks, etc.) | Notion only | | Custom automation | Full control | Limited | | Cost | API costs | Subscription | | Privacy | Your VPS | Notion servers |

Related Guides

Need Help?

Notion integration requires careful API configuration and database mapping. Our premium setup service includes full Notion integration with your existing workspace structure.

Need a VPS for Your Bot?

We recommend Hostinger KVM 2 VPS - reliable, fast, and perfect for AI chatbots. Get started with our recommended setup.

Get Hostinger VPS

Need Help With Setup?

Got your VPS? Let us handle the technical work. Professional setup and maintenance for OpenClaw (formerly Clawd.bot).