Tool

Create pages

Notion-Create-Pages is a powerful AI tool that allows users to create one or multiple Notion pages effortlessly with specified properties and rich content. It supports various parent contexts, including individual pages, databases, or data sources, enabling seamless organization and automation within Notion workspaces.

Notion

Features

  • Create multiple Notion pages in a single API call for efficient content generation.
  • Supports specifying parent context as a page, database, or data source for precise page placement.
  • Allows detailed property input, including advanced formats for date, location, number, and checkbox types.
  • Supports rich content using Notion-flavored Markdown to create well-formatted pages.
  • Includes safeguards for property naming and handles special cases to ensure smooth integration with Notion databases.

Benefits

  • Automates the creation of organized Notion pages, saving time and reducing manual effort.
  • Enhances collaboration by accurately placing pages under correct parents for team use.
  • Flexibly supports a variety of property types to match any Notion database schema requirements.
  • Improves content presentation with advanced Markdown formatting compatible with Notion's interface.
  • Facilitates integration with other tools via JSON schema, enabling scalable workspace management.

Description

Overview

Creates one or more Notion pages, with the specified properties and content.

Parent

All pages created with a single call to this tool will have the same parent. The parent can be a Notion page ("page_id") or data source ("data_source_id"). If the parent is omitted, the pages are created as standalone, workspace-level private pages, and the person that created them can organize them later as they see fit. If you have a database URL, ALWAYS pass it to the "fetch" tool first to get the schema and URLs of each data source under the database. You can't use the "database_id" parent type if the database has more than one data source, so you'll need to identify which "data_source_id" to use based on the situation and the results from the fetch tool (data source URLs look like collection://<data_source_id>). If you know the pages should be created under a data source, do NOT use the database ID or URL under the "page_id" parameter; "page_id" is only for regular, non-database pages.

Properties

Notion page properties are a JSON map of property names to SQLite values. When creating pages in a database:

  • Use the correct property names from the data source schema shown in the fetch tool results.
  • Always include a title property. Data sources always have exactly one title property, but it may not be named "title", so, again, rely on the fetched data source schema. For pages outside of a database:
  • The only allowed property is "title", which is the title of the page in inline markdown format. Always include a "title" property. IMPORTANT: Some property types require expanded formats:
  • Date properties: Split into "date:{property}
    ", "date:{property}
    " (optional), and "date:{property}
    " (0 or 1)
  • Place properties: Split into "place:{property}
    ", "place:{property}
    ", "place:{property}
    ", "place:{property}
    ", and "place:{property}
    " (optional)
  • Number properties: Use JavaScript numbers (not strings)
  • Checkbox properties: Use "YES" for checked, "NO" for unchecked Special property naming: Properties named "id" or "url" (case insensitive) must be prefixed with "userDefined:" (e.g., "userDefined
    ", "userDefined
    ")

Examples

<example description="Create a standalone page with a title and content"> { "pages": [ { "properties": {"title": "Page title"}, "content": "# Section 1 Section 1 content # Section 2 Section 2 content" } ] } </example> <example description="Create a page under a database's data source"> { "parent": {"data_source_id": "f336d0bc-b841-465b-8045-024475c079dd"}, "pages": [ { "properties": { "Task Name": "Task 123", "Status": "In Progress", "Priority": 5, "Is Complete": "__YES__", "date:Due Date:start": "2024-12-25", "date:Due Date:is_datetime": 0 } } ] } </example> <example description="Create a page with an existing page as a parent"> { "parent": {"page_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}, "pages": [ { "properties": {"title": "Page title"}, "content": "# Section 1 Section 1 content # Section 2 Section 2 content" } ] } </example> ## Content Notion page content is a string in Notion-flavored Markdown format. Don't include the page title at the top of the page's content. Only include it under "properties". Below is the full Notion-flavored Markdown specification, applicable to this create pages tool and other tools like update-page and fetch. This spec is also available as a separate MCP resource. ### Notion-flavored Markdown Notion-flavored Markdown is a variant of standard Markdown with additional features to support all Block and Rich text types. Use tabs for indentation. Use backslashes to escape characters. For example, * will render as * and not as a bold delimiter. Block types: Markdown blocks use a {color="Color"} attribute list to set a block color. Text: Rich text {color="Color"} Children Headings: # Rich text {color="Color"} ## Rich text {color="Color"} ### Rich text {color="Color"} (Headings 4, 5, and 6 are not supported in Notion and will be converted to heading 3.) Bulleted list: - Rich text {color="Color"} Children Numbered list: 1. Rich text {color="Color"} Children Bulleted and numbered list items should contain inline rich text -- otherwise they will render as empty list items, which look awkward in the Notion UI. (The inline text should be rich text -- any other block type will not be rendered inline, but as a child to an empty list item.) Rich text types: Bold: **Rich text** Italic: *Rich text* Strikethrough: ~~Rich text~~ Underline: <span underline="true">Rich text</span> Inline code: `Code` Link: [Link text](URL) Citation: [^URL] To create a citation, you can either reference a compressed URL like this,[^{{1}}] or a full URL like this.[^example.com] Colors: <span color?="Color">Rich text</span> Inline math: $Equation$ or $`Equation`$ if you want to use markdown delimiters within the equation. There must be whitespace before the starting $ symbol and after the ending $ symbol. There must not be whitespace right after the starting $ symbol or before the ending $ symbol. Inline line breaks within a block (this is mostly useful in multi-line quote or callout blocks, where an ordinary newline character should not be used since it will break up the block structure): <br> Mentions: User: <mention-user url="{{URL}}">User name</mention-user> The URL must always be provided, and refer to an existing User. But Providing the user name is optional. In the UI, the name will always be displayed. So an alternative self-closing format is also supported: <mention-user url="{{URL}}"/> Page: <mention-page url="{{URL}}">Page title</mention-page> The URL must always be provided, and refer to an existing Page. Providing the page title is optional. In the UI, the title will always be displayed. Mentioned pages can be viewed using the "view" tool. Database: <mention-database url="{{URL}}">Database name</mention-database> The URL must always be provided, and refer to an existing Database. Providing the database name is optional. In the UI, the name will always be displayed. Mentioned databases can be viewed using the "view" tool. Data source: <mention-data-source url="{{URL}}">Data source name</mention-data-source> The URL must always be provided, and refer to an existing data source. Providing the data source name is optional. In the UI, the name will always be displayed. Mentioned data sources can be viewed using the "view" tool. Date: <mention-date start="YYYY-MM-DD" end="YYYY-MM-DD"/> Datetime: <mention-date start="YYYY-MM-DDThh:mm:ssZ" end="YYYY-MM-DDThh:mm:ssZ"/> Custom emoji: :emoji_name: Custom emoji are rendered as the emoji name surrounded by colons. Colors: Text colors (colored text with transparent background): gray, brown, orange, yellow, green, blue, purple, pink, red Background colors (colored background with contrasting text): gray_bg, brown_bg, orange_bg, yellow_bg, green_bg, blue_bg, purple_bg, pink_bg, red_bg Usage: - Block colors: Add color="Color" to the first line of any block - Rich text colors (text colors and background colors are both supported): Use <span color="Color">Rich text</span> #### Advanced Block types for Page content The following block types may only be used in page content. <advanced-blocks> Quote: > Rich text {color="Color"} Children Use of a single ">" on a line without any other text should be avoided -- this will render as an empty blockquote, which is not visually appealing. To include multiple lines of text in a single blockquote, use a single > and linebreaks (not multiple > lines, which will render as multiple separate blockquotes, unlike in standard markdown): > Line 1<br>Line 2<br>Line 3 {color="Color"} To-do: - [ ] Rich text {color="Color"} Children - [x] Rich text {color="Color"} Children Toggle: ▶ Rich text {color="Color"} Children Toggle heading 1: ▶# Rich text {color="Color"} Children Toggle heading 2: ▶## Rich text {color="Color"} Children Toggle heading 3: ▶### Rich text {color="Color"} Children For toggles and toggle headings, the children must be indented in order for them to be toggleable. If you do not indent the children, they will not be contained within the toggle or toggle heading. Divider: --- Table: <table fit-page-width?="true|false" header-row?="true|false" header-column?="true|false"> <colgroup> <col color?="Color"> <col color?="Color"> </colgroup> <tr color?="Color"> <td>Data cell</td> <td color?="Color">Data cell</td> </tr> <tr> <td>Data cell</td> <td>Data cell</td> </tr> </table> Note: All table attributes are optional. If omitted, they default to false. Table structure: - <table>: Root element with optional attributes: - fit-page-width: Whether the table should fill the page width - header-row: Whether the first row is a header - header-column: Whether the first column is a header - <colgroup>: Optional element defining column-wide styles - <col>: Column definition with optional attributes: - color: The color of the column - width: The width of the column. Leave empty to auto-size. - <tr>: Table row with optional color attribute - <td>: Data cell with optional color attribute Color precedence (highest to lowest): 1. Cell color (<td color="red">) 2. Row color (<tr color="blue_bg">) 3. Column color (<col color="gray">) To format text inside of table cells, use Notion-flavored Markdown, not HTML. For instance, bold text in a table should be wrapped in **, not <strong>. Equation: $$ Equation $$ Code: ```language Code ``` XML blocks use the "color" attribute to set a block color. Callout: <callout icon?="emoji" color?="Color">Rich text</callout> To create a new line within a callout, use <br>, not a newline character. Using a newline character in a callout will cause a rendering bug. For any other formatting inside of callout blocks, use Notion-flavored Markdown, not HTML. For instance, bold text in a callout should be wrapped in **, not <strong>. Columns: <columns> <column> Children </column> <column> Children </column> </columns> Page: <page url="{{URL}}" color?="Color">Title</page> Sub-pages can be viewed using the "view" tool. To create a new sub-page, omit the URL. You can then update the page content and properties with the "update-page" tool. Example: <page>New Page</page> WARNING: Using <page> with an existing page URL will MOVE the page to a new parent page with this content. If moving is not intended use the <mention-page> block instead. Database: <database url="{{URL}}" inline?="{true|false}" icon?="Emoji" color?="Color">Title</database> To create a new database, omit the URL. You can then update the database properties and content with the "update-database" tool. Example: <database>New Database</database> The "inline" toggles how the database is displayed in the UI. If it is true, the database is fully visible and interactive on the page. If false, the database is displayed as a sub-page. There is no "Data Source" block type. Data Sources are always inside a Database, and only Databases can be inserted into a Page. WARNING: Using <database> with an existing database URL will MOVE the database to a new parent page with this content. If moving is not intended use the <mention-database> block instead. Audio: <audio source="{{URL}}" color?="Color">Caption</audio> File: File content can be viewed using the "view" tool. <file source="{{URL}}" color?="Color">Caption</file> Image: Image content can be viewed using the "view" tool. <image source="{{URL}}" color?="Color">Caption</image> PDF: PDF content can be viewed using the "view" tool. <pdf source="{{URL}}" color?="Color">Caption</pdf> Video: <video source="{{URL}}" color?="Color">Caption</video> (Note that source URLs can either be compressed URLs, such as source="{{1}}", or full URLs, such as source="example.com". Full URLs enclosed in curly brackets, like source="{{https://example.com}}" or source="{{example.com}}", do not work.) Table of contents: <table_of_contents color?="Color"/> Synced block: The original source for a synced block. When creating a new synced block, do not provide the URL. After inserting the synced block into a page, the URL will be provided. <synced_block url?="{{URL}}"> Children </synced_block> Note: When creating new synced blocks, omit the url attribute - it will be auto-generated. When reading existing synced blocks, the url attribute will be present. Synced block reference: A reference to a synced block. The synced block must already exist and url must be provided. You can directly update the children of the synced block reference and it will update both the original synced block and the synced block reference. <synced_block_reference url="{{URL}}"> Children </synced_block_reference> Meeting notes: <meeting-notes> Rich text (meeting title) <summary> AI-generated summary of the notes + transcript </summary> <notes> User notes </notes> <transcript> Transcript of the audio (cannot be edited) </transcript> </meeting-notes> Note: The <transcript> tag contains a raw transcript and cannot be edited. If you are creating a new meeting notes block, do not include <transcript> tags -- attempting to do so will result in an error. Unknown (a block type that is not supported in the API yet): <unknown url="{{URL}}" alt="Alt"/> </advanced-blocks>

Parameters

2 parameters

NameTypeDescription
pagesrequiredobject[]

The pages to create.

parentany

The parent under which the new pages will be created. This can be a page (page_id), a database page (database_id), or a data source/collection under a database (data_source_id). If omitted, the new pages will be created as private pages at the workspace level. Use data_source_id when you have a collection:// URL from the fetch tool.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .