Lesson 21 — OpenClaw Notion Skill: Use AI to Create Pages, Query Databases, and Auto-Write Weekly Reports (2026)
Goal: Install the Notion Skill to let OpenClaw use the Notion API to control Notion with natural language: create pages, query databases, update task status.
What Is the Notion Skill?
The Notion Skill is a high-frequency productivity Skill on ClawHub (68k downloads). It gives OpenClaw full control over your Notion workspace through the official Notion API. Creating pages, querying databases, updating task status, generating weekly reports — tasks that used to require manual work in the Notion UI are now a single sentence away.
Step 1: Create a Notion Integration and Get an API Key
Before installing the Skill, you need to create an Integration in Notion:
Step 1: Visit https://www.notion.so/my-integrations and click "+ New integration" in the top right.
Step 2: Fill in the Integration name (like "OpenClaw"), select your Workspace, and click "Submit".
Step 3: After creation, copy the "Internal Integration Token" — it looks like secret_xxxxxxxxx — this is your API Key.
Step 4: Grant the Integration access to specific pages or databases. Open the target page in Notion, click "..." in the top right → "Add connections" → select the Integration you just created.
Note: Notion Integrations have no permissions by default. You must manually connect it to the pages you need to operate, otherwise AI won't be able to access them.
Step 2: Install the Skill and Configure the API Key
In WebChat or Telegram, send:
/install @steipete/notion
Configure the API Key:
/config notion api_key secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Or via the command line:
pnpm openclaw config set notion.api_key "secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Verify configuration:
pnpm openclaw run "List the names of all databases in my Notion workspace"If it returns a list of databases, configuration was successful.
Step 3: Create Pages and Sub-Pages
Create a standalone page:
Create a new sub-page under the "Project Docs" page in Notion, titled "OpenClaw Integration Plan",
with a ~200-word project background introduction in the body
Create a structured page:
Create a meeting record for today (2026-03-30) under the "Meeting Notes" page,
with these sections: attendees, agenda, decisions, action items
Create via API (good for automation scripts):
pnpm openclaw run "Use Notion API to create a sub-page under page_id=xxx, title: Q2 OKR Planning, content: [your content]"The most common use case is quickly creating meeting records, project documents, and knowledge base entries.
Step 4: Database Queries (Filter + Sort)
Query with filter conditions:
Query the "Task Management" database for all tasks with status "In Progress", sorted by due date ascending
Multi-condition filter:
In the "Project Tracking" database, find tasks where: owner is "Alice", priority is "High", and due this week
Full-text search:
Search Notion for all pages containing the keyword "MCP Protocol"
Notion's full filter type set is supported: text match, number range, date range, multi-select tags, relation fields, etc.
Step 5: Update Database Entries
Bulk update task status:
In the "Task Management" database, change all tasks with a due date before today and status not "Completed" to "Overdue"
Add tags:
Add the tag "Artificial Intelligence" to all pages in the "Knowledge Base" database that mention "AI"
Update a single entry:
Change the status of task "Complete API Documentation" to "Completed", set completion date to today
Step 6: Real Workflow — Auto-Generate Weekly Reports
This is the most common real use case. Before finishing work every Friday, send:
From my "Task Management" database, summarize tasks completed this week (2026-03-24 to 2026-03-28),
generate a structured weekly report, create it in the "Weekly Report Archive" page, title format: 2026-W13 Weekly Report
Sample generated weekly report:
# 2026-W13 Weekly Report
## Completed This Week
- [x] Finished OpenClaw Notion Skill documentation (Lesson 21)
- [x] Fixed MCP connection timeout bug
- [x] Shipped user feedback collection feature
## This Week's Stats
- Tasks completed: 8
- New tasks added: 3
- Overdue tasks: 1
## Next Week's Plan
- [ ] Complete Lesson 22 Auto-Updater documentationCombined with cron auto-trigger (see Lesson 06):
# Auto-generate and create weekly report every Friday at 5:30 PM
30 17 * * 5 pnpm openclaw run "Generate this week's Notion weekly report and save it"Step 7: Combine with GitHub Skill
Chain Lesson 14's GitHub Skill with the Notion Skill for automatic development log syncing:
Query all PRs merged to the main branch in the past 7 days,
categorize by feature module, sync to the "Development Log" database in Notion,
each record including: PR title, merge time, author, linked Issue
This workflow delivers the core value of not needing a Zapier subscription — directly connecting GitHub and Notion through OpenClaw.
FAQ
Does the OpenClaw Notion Skill require a paid Notion account?
No paid account needed. The Notion API is fully open to free accounts — you can create an Integration and use all API features on the free plan, including creating pages, querying databases, and updating entries. The free account's limitations are primarily member count (max 10 collaborators) and file upload size (5MB), which don't affect OpenClaw's AI automation operations. The only thing to be aware of is the Notion API rate limit (3 requests per second) — the Skill automatically controls request frequency during bulk operations.
How do I have AI automatically update Notion task status every day?
Use Lesson 06's scheduled task feature — add a daily task to your crontab: 0 9 * * * pnpm openclaw run "Update today's Notion task status", then describe your update rules in the prompt, like "push yesterday's incomplete tasks' due dates forward by one day." You can also configure condition-triggered updates in OpenClaw's Hooks, like automatically updating the corresponding Notion task status when a GitHub PR is merged.
Could the Notion API Key be leaked?
The API Key is stored in OpenClaw's local config file (~/.openclaw/config.json) and is never uploaded to any cloud. Set the config file's permissions to 600 (chmod 600 ~/.openclaw/config.json) to prevent other users on the same machine from reading it. If you suspect a Key has been compromised, immediately regenerate a new Token on the Notion Integration settings page — the old Token becomes invalid immediately. We also recommend creating a minimal-permission Integration that's only connected to the pages it actually needs to operate, rather than your entire Workspace.
Does it support all Notion database property types?
It supports all property types exposed by the Notion API, including: text, number, select (single/multi), date, person, file, checkbox, URL, email, phone, formula, relation, and rollup. The only limitation is that formula fields can only have their calculated results read — the formula itself can't be modified. Before operating on a database, AI reads the Schema to automatically recognize each field's type, so when you say "change the status to completed" in natural language, it automatically maps to the correct property type.