notion-cli_skill

This skill helps you manage Notion pages, databases, and blocks via a CLI, enabling creation, retrieval, and updates across your workspace.
  • Python

2.5k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill notion-cli

  • _meta.json285 B
  • README.md5.2 KB
  • SKILL.md4.9 KB

Overview

This skill provides a command-line interface for creating, reading, updating, and managing Notion pages, databases, and blocks. It exposes search, page and database retrieval, query, and update operations with multiple output formats and an interactive query mode. It relies on a Notion integration token and automates authentication and rate-limit handling.

How this skill works

The CLI reads your NOTION_TOKEN (or an api_key file) and interacts with the Notion REST API to perform CRUD operations on pages, databases, and blocks. Commands include search, page retrieve (with optional recursive block fetch), db query with filter JSON, and create/update endpoints using Notion property payloads. Output can be table, csv, json, yaml, or raw API JSON.

When to use it

  • Automate repeated updates to Notion pages or database items from scripts and CI jobs.
  • Bulk-query or export database rows in CSV/JSON/YAML for reporting and backups.
  • Quickly search and inspect page content and nested blocks from the terminal.
  • Create new pages in a database or update properties without opening the web UI.
  • Integrate Notion data manipulation into shell pipelines and cron jobs.

Best practices

  • Store your integration token securely (e.g., ~/.config/notion/api_key) and export NOTION_TOKEN in your shell session.
  • Share target pages and databases with your integration in Notion so the CLI has permission.
  • Use the --raw flag when you need full API responses for debugging or precise scripting.
  • Test updates on a staging database or page before running bulk patches to avoid accidental data loss.
  • Use interactive db query mode for building complex filter JSON before automating it in scripts.

Example use cases

  • Search for project pages: notion-cli search --query "Roadmap" and then retrieve content with page retrieve <PAGE_ID> -r.
  • Export active tasks to CSV for processing: notion-cli db query <DB_ID> -a '{"property":"Status","status":{"equals":"Active"}}' --output csv.
  • Create a new database entry via curl or the CLI with the appropriate title, status, and date properties.
  • Update a page status and priority programmatically using a PATCH request or notion-cli page update workflow.
  • Retrieve database schema and metadata: notion-cli db retrieve <DB_ID> to inspect property types for automation.

FAQ

Save your integration token in a file like ~/.config/notion/api_key and export NOTION_TOKEN=$(cat ~/.config/notion/api_key) before running commands.

Can I fetch nested block content for a page?

Yes. Use page retrieve <PAGE_ID> -r to recursively retrieve blocks and nested content.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational