Actions16
Overview
The node enables creating new content blocks within a Notion page or block. It supports a wide variety of block types such as paragraphs, headings, lists, to-dos, quotes, code snippets, media (images, videos, audio), embeds, tables, and more. This flexibility allows users to programmatically build rich, structured Notion documents or append complex content hierarchies.
Typical use cases include:
- Automating the generation of meeting notes with formatted headings and bullet points.
- Creating task lists with checkboxes (to-do blocks).
- Adding media content like images or videos to pages.
- Building nested content structures by including child blocks.
- Dynamically generating reports or documentation inside Notion.
Properties
| Name | Meaning |
|---|---|
| Parent ID | The ID of the parent page or block where the new blocks will be created. |
| Blocks | A collection of one or more blocks to create. Each block includes: - Type: The kind of block to create. Options include Paragraph, Heading 1/2/3, Bulleted List Item, Numbered List Item, To Do, Toggle, Quote, Callout, Code, Divider, Image, Video, Audio, File, PDF, Bookmark, Embed, Link Preview, Equation, Table, Column List, Synced Block, Template, Table of Contents. - Content: Text or URL content for the block. - Rich Text (JSON): Rich text content as a JSON array supporting formatting. - Properties (JSON): Additional block properties such as color, checked state, language, etc., provided as JSON. - Children (JSON): Child blocks as a JSON array to nest under this block. |
| Additional Fields | Optional extra fields: - Icon: Emoji or image URL to set as the page icon. - Cover: URL for the page cover image. - Archive: Boolean flag to archive the page. (Though mainly relevant for pages, included here.) |
Output
The output is an array of results corresponding to each input item processed. For the "Create Block" operation, the output JSON contains the response from the Notion API representing the newly created blocks appended as children to the specified parent block or page.
The structure typically includes:
object: The type of returned object (e.g., "list").results: An array of created block objects with their IDs, types, and content details.count: Number of blocks created.
No binary data output is produced by this operation.
Dependencies
- Requires valid Notion API credentials configured in n8n to authenticate requests.
- Uses Notion's official API endpoints to create and manage blocks.
- Relies on utility functions for parsing rich text JSON, validating block structure, and converting user input into Notion API-compatible payloads.
Troubleshooting
- Invalid Credentials Error: If the node throws an error about invalid Notion API credentials, verify that the API key/token is correctly set up and has sufficient permissions.
- No Blocks Provided: The node expects at least one block definition in the "Blocks" property. Omitting this or providing malformed JSON in properties/children fields will cause errors.
- JSON Parsing Errors: Properties, children, and rich text inputs must be valid JSON strings when applicable. Invalid JSON will result in processing errors.
- Unsupported Block Types or Invalid Properties: Using unsupported block types or incorrect property formats may cause validation failures.
- API Rate Limits: Creating many blocks in rapid succession might hit Notion API rate limits; consider adding delays or batching requests.