Create Page
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai. Please migrate to the recommended alternative components.
Create a new page in a Notion database.
This component lets you add a page to any Notion database by sending the page’s properties as a JSON string. It’s useful when you want to automate the creation of records in Notion from other parts of your workflow.
How it Works
When you run the component, it takes the Database ID and the Properties (JSON) you provide, builds a request to the Notion API (https://api.notion.com/v1/pages
), and sends it with your Notion integration token.
If the request succeeds, the component returns the full JSON response from Notion, showing the properties that were created. If something goes wrong (bad JSON, missing fields, network error, etc.), it returns a readable error message instead.
Inputs
- Database ID: The ID of the Notion database where the new page will be added.
- Properties (JSON): A JSON string that defines the properties of the new page (e.g., title, status, dates).
Note: The JSON must match the schema of the database you’re targeting. - Credential: This component requires a Notion API credential.
- First, set up a Notion API credential in Nappai’s credentials section.
- Then, select that credential in the component’s “Credential” field.
The credential holds the Notion Integration Token, which is needed to authenticate the API request.
You can find the integration token here: here.
Outputs
- Data: The component’s
run_model
method returns aData
object.
Text: A human‑readable summary of the created page’s properties.
Data: The raw JSON response from Notion, which can be used by other components. - Tool: The component’s
build_tool
method returns aTool
object that can be used by agents to invoke the page‑creation logic programmatically.
Usage Example
-
Configure the credential
- Go to Credentials → Add Credential → Notion API
- Paste your Notion Integration Token.
-
Add the component to your workflow
- Drag the Create Page component onto the canvas.
- In the Credential field, choose the credential you just created.
- Enter the Database ID of the target database.
- Paste a JSON string into Properties (JSON), e.g.:
{"Name": {"title": [{"text": {"content": "New Task"}}]},"Status": {"select": {"name": "In Progress"}}} -
Run the workflow
- The component will create the page and output a summary like:
Created page properties:Name: New TaskStatus: In ProgressThe raw JSON response is also available in the
Data
output for further processing.
Related Components
- NotionPageUpdater – Update an existing page’s properties.
- NotionDatabaseLoader – Load data from a Notion database.
- NotionDatabaseCreator – Create a new Notion database.
These components can be chained together to build full CRUD workflows with Notion.
Tips and Best Practices
- Validate your JSON before running the component. A small typo can cause the whole request to fail.
- Check the database schema first. Use the Notion API or the Notion UI to see the exact property names and types.
- Keep your integration token secret. Never expose it in public code or logs.
- Use a dedicated credential for each environment (dev, staging, prod) to avoid accidental cross‑environment data writes.
- Test with a small database before scaling up to production.
Security Considerations
- The Notion Integration Token is a powerful credential that grants write access to your Notion workspace. Treat it like a password.
- Store the token in Nappai’s secure credential store, not in plain text or in the workflow itself.
- Regularly rotate the token and update the credential in Nappai.
- Monitor API usage for any unexpected activity.