@robinpath/notion
v0.3.0
Published
Notion integration — query databases, create/update/archive pages, read and write block content, search, and list users. Uses the encrypted credential vault for internal integration tokens.
Downloads
53
Readme
@robinpath/notion
Notion module for RobinPath.
Why use this module?
The notion module lets you:
- Retrieve a Notion page by ID.
- Create a new page in a database or as a child of another page.
- Update properties of an existing page.
- Archive (soft-delete) a Notion page.
- Query a Notion database with optional filters and sorts.
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
robinpath add @robinpath/notionQuick Start
1. Set up credentials
notion.setToken "ntn_xxx"2. Retrieve a Notion page by ID.
notion.getPage "page-id-here"Available Functions
| Function | Description |
|----------|-------------|
| notion.setToken | Set the Notion integration token. |
| notion.getPage | Retrieve a Notion page by ID. |
| notion.createPage | Create a new page in a database or as a child of another page. |
| notion.updatePage | Update properties of an existing page. |
| notion.archivePage | Archive (soft-delete) a Notion page. |
| notion.queryDatabase | Query a Notion database with optional filters and sorts. |
| notion.getDatabase | Retrieve a Notion database schema. |
| notion.getBlocks | Get child blocks of a page or block. |
| notion.appendBlocks | Append child blocks to a page or block. |
| notion.deleteBlock | Delete a block by ID. |
| notion.search | Search across all pages and databases the integration has access to. |
Examples
Retrieve a Notion page by ID.
notion.getPage "page-id-here"Create a new page in a database or as a child of another page.
notion.createPage "db-id" {"Name":{"title":[{"text":{"content":"New Page"}}]}}Update properties of an existing page.
notion.updatePage "page-id" {"Status":{"select":{"name":"Done"}}}Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/notion";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
notion.setToken "ntn_xxx"
notion.getPage "page-id-here"
`);Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/google-sheets— Google Sheets module for complementary functionality@robinpath/google-calendar— Google Calendar module for complementary functionality@robinpath/google-contacts— Google Contacts module for complementary functionality@robinpath/google-forms— Google Forms module for complementary functionality@robinpath/gmail— Gmail module for complementary functionality
License
MIT
