Page
The Page component lets you work with Notion pages directly from Nappai.
You can create new pages, update existing ones, list pages in a database, read a page’s content, or create a page from a database record.
All actions are performed through the Notion API, so you’ll need a Notion integration token to use this component.
How it Works
When you run the component, Nappai sends a request to the Notion API using the token you selected in the Credential field.
Depending on the chosen Operation, the component builds the appropriate API call:
- Create Page – Builds a new page with the supplied title, parent page, and optional properties.
- Create Page from Database – Creates a page inside a specified database and can automatically add the database ID to the page’s properties.
- List – Calls the Notion API to retrieve pages that match a title search (or all pages if the search field is empty).
- Update Page – Sends a patch request to modify a page’s properties or content.
- Content Page – Retrieves the full content of a page and returns it as Notion blocks.
If Mapping Mode is turned on, the component can process many records at once. Each input field can receive a fixed value, a mapped value from another component, or a JavaScript expression that calculates the value on the fly.
Operations
This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:
- Create Page from Database: Create a new page inside a selected database, optionally adding the database ID to the page’s properties.
- List: Retrieve a list of pages that match a title search or all accessible pages if the search field is empty.
- Update Page: Modify the properties or content of an existing page.
- Content Page: Get the full content of a page as Notion blocks.
- Create Page: Create a new page under a specified parent page with a title and optional properties.
To use the component, first select the operation you need in the Operation field.
Inputs
Mapping Mode
This component has a special mode called Mapping Mode. When you enable this mode using the toggle switch, an additional input called Mapping Data is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write JavaScript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Note on Credentials
This component requires a Notion API credential.
- Configure the credential in the Credentials section of Nappai.
- Select that credential in the Credential field of this component.
(The credential fields such as the integration token are not shown in the input list.)
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
-
Operation: Choose the action you want to perform.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
-
Page/Block ID: The ID of the page or block where you want to add content.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
-
Database ID: The ID of the Notion database.
- Visible in: Create Page from Database
-
Include ID Database: If enabled, the database ID is added to the page’s properties.
- Visible in: Create Page from Database
-
Mapping Mode: Enable mapping mode to process multiple data records in batch.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
-
Markdown Text: The markdown text to convert to Notion blocks or the content to add to the page.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
-
Page ID: The ID of the Notion page to retrieve or as parent.
- Visible in: Update Page, Content Page
-
Parent Page ID: The ID of the parent Notion page where the new page will be created.
- Visible in: Create Page
-
Properties (JSON): The properties of the new page as a JSON string.
- Visible in: Create Page from Database, Create Page
-
Search by title: Text to search pages by title and return properties. Leave empty to list all accessible pages.
- Visible in: List
-
Title: Title of the new Notion page.
- Visible in: Create Page from Database, Create Page
-
Tool Name: The name of the tool that will be used when this component is connected as a tool.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
-
Tool Description: A detailed description of what this tool does.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
-
Tools arguments metadata: Defines the arguments metadata for the tools.
- Visible in: Create Page from Database, List, Update Page, Content Page, Create Page
Outputs
- Data: The raw data returned from the Notion API (e.g., page details, list of pages).
- Tool: A tool representation that can be used by Nappai agents to call this component programmatically.
Usage Example
Example 1 – Create a Page from a Database
- Operation: Select Create Page from Database.
- Database ID: Choose the database where the page should be added.
- Title: Enter the page title.
- Properties (JSON): Provide any properties you want to set (e.g., status, tags).
- Include ID Database: Check this if you want the database ID added to the properties.
- Markdown Text: Add any initial content in markdown.
- Run the component.
The component will create a new page in the chosen database and return the page details in the Data output.
Example 2 – List Pages by Title
- Operation: Select List.
- Search by title: Enter a keyword (e.g., “Project”).
- Run the component.
The component will return all pages whose titles contain “Project” in the Data output.
Related Components
- NotionDatabase – Manage Notion databases (create, update, list).
- NotionBlocks – Work with individual Notion blocks (add, update, delete).
- NotionSearch – Search across all Notion content.
Tips and Best Practices
- Keep your Notion integration token secret; never expose it in public workflows.
- Use Mapping Mode when you need to process many records (e.g., bulk page creation).
- When creating pages from a database, consider adding the database ID to the properties for easier filtering later.
- Use the Markdown Text field to quickly add formatted content without manually building blocks.
- Test each operation separately before chaining them in a larger workflow.
Security Considerations
- The Notion API token is stored in the Credential field and is never exposed in the component’s outputs.
- Ensure that only trusted users have access to the credentials and the component configuration.
- When using Mapping Mode, validate any incoming data to avoid injection of malicious content into Notion pages.