Add Content to Page
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai. Please migrate to the recommended alternative components.
Add Content to Page is a tool that lets you take any markdown text you write and automatically paste it into a Notion page or block. It works by turning the markdown into the format that Notion expects and then sending that data to Notion’s API.
How it Works
When you run the component, it first converts your markdown into HTML using the markdown
library. Then it parses that HTML with BeautifulSoup to break it down into individual elements (headings, paragraphs, lists, images, etc.). Each element is turned into a Notion “block” that matches the type of content (e.g., a heading block, a paragraph block, a code block, etc.). Finally, the component calls the Notion API’s patch block children endpoint to append all of those blocks to the page or block you specified.
Because it talks directly to Notion, you need a Notion integration token. The component sends that token in the Authorization
header of the API request.
Inputs
This component requires a Notion API credential.
- Configure a “Notion API” credential in the Nappai Credentials section.
- Select that credential in the component’s “Credential” field.
Input Fields
- Page/Block ID: The unique identifier of the Notion page or block where you want to add the content.
- Markdown Text: The markdown you want to convert and add to the page.
Outputs
- Data: The raw JSON response from the Notion API, showing the result of the operation.
- Tool: A structured tool that can be used by an LLM to perform the same action programmatically.
Usage Example
- Create a new workflow in Nappai.
- Add the “Add Content to Page” component.
- Enter the ID of the Notion page you want to update.
- Paste or type the markdown you want to add.
- Run the workflow.
- The component will append the formatted content to the specified page, and you’ll see the API response in the Data output.
Related Components
- Notion Directory Loader – Browse and list pages in a Notion workspace.
- Notion Query – Retrieve content from a Notion database.
- Notion Page Creator – Create a new page in Notion (recommended for new workflows).
Tips and Best Practices
- Keep your markdown simple; complex tables or nested lists may need extra formatting.
- Test with a small page first to confirm the content appears as expected.
- Use the “Tool” output if you want an LLM to generate markdown and then add it to Notion automatically.
- Remember to keep your Notion integration token secure; never expose it in public scripts.
Security Considerations
- Store the Notion integration token in Nappai’s secure credential store.
- Avoid sharing the token or the component’s output with untrusted parties.
- The component only sends data to Notion’s official API, so no external data is exposed.