Notion AI Tool icon

Notion AI Tool

AI-powered tool for creating and managing Notion content. Designed for use with AI Agent Nodes.

Overview

The "Notion AI Tool" node integrates with the Notion API to enable AI-powered creation and management of Notion content. It supports multiple operations such as creating pages with structured content, appending content to existing pages, searching pages, updating page properties, creating database entries, and querying databases.

This node is beneficial for automating content workflows in Notion, especially when combined with AI agents that generate or manipulate text. For example, you can automatically create a new project page with headings and lists from natural language input, append meeting notes to an existing page, or query a database for specific entries based on filters.

Practical examples:

  • Automatically generate a well-structured project documentation page from a plain text description.
  • Append daily standup notes to a team’s shared Notion page.
  • Search for recent pages related to a topic and retrieve their metadata.
  • Update the status and priority properties of a task page.
  • Create new entries in a task tracking database with specified properties.
  • Query a database to find all tasks marked as "In Progress".

Properties

Name Meaning
Additional Options Collection of optional settings:
β€’ Icon: Emoji icon for the page (e.g., πŸ“, 🎯, πŸ“Š)
β€’ Cover Image URL: URL of cover image for the page
β€’ Return Full Content: Boolean to return full page content or just metadata
β€’ Max Results: Maximum number of results to return (1-100)
Operation The action to perform. Options include:
β€’ Create Page with Content
β€’ Add Content to Page
β€’ Search and Retrieve Pages
β€’ Update Page Properties
β€’ Create Database Entry
β€’ Query Database
Page Title Title of the new page to create (required for creating pages)
Parent Page/Database ID ID or URL of the parent page or database where new pages or entries will be created (required for creation operations)
Content Natural language content to add or append, which the node structures into Notion blocks (headings, paragraphs, lists, etc.)
Target Page ID ID or URL of the existing page to modify (for adding content or updating properties)
Search Query Text query to search pages by title or content
Search Type Scope of search:
β€’ All Content
β€’ Titles Only
β€’ Recent Pages
Properties to Update JSON or natural language describing properties to update on a page
Database ID ID or URL of the database to query or add entries to
Entry Properties JSON or natural language describing properties for a new database entry
Query Filter Filter criteria in JSON or natural language to filter database query results

Output

The node outputs an array of JSON objects, each corresponding to one input item processed. Each output object includes:

  • operation: The operation performed.
  • success: Boolean indicating if the operation succeeded.
  • Operation-specific fields, for example:
    • For page creation: pageId, title, url, message.
    • For adding content: pageId, blocksAdded, message, result (API response).
    • For searching pages: totalResults, pages (array of page objects), message.
    • For updating properties: pageId, updatedProperties (list), message, result.
    • For database entry creation: entryId, databaseId, message, result.
    • For querying database: databaseId, totalResults, entries (array), message.

If the operation fails and "Continue On Fail" is enabled, the output includes an error message and success: false.

The node does not output binary data.

Dependencies

  • Requires a valid Notion API key credential configured in n8n.
  • Uses Notion API endpoints for pages, blocks, search, and databases.
  • No additional external dependencies beyond the Notion API.

Troubleshooting

  • Invalid Notion API credentials: The node validates credentials before execution. Ensure your API key is correct and has sufficient permissions.
  • No valid content blocks found to add: When adding content, if the provided text cannot be parsed into Notion blocks, the node throws an error. Make sure the content follows supported markdown-like syntax.
  • Unknown operation: If an unsupported operation value is set, the node throws an error. Verify the operation parameter.
  • JSON parsing errors: For properties or filters provided as JSON strings, invalid JSON will cause fallback to natural language parsing or errors. Validate JSON syntax carefully.
  • Max Results limits: The node caps max results at 100; setting higher values will be reduced silently.
  • Page or database IDs: IDs can be provided as raw IDs or full URLs. Invalid or inaccessible IDs will cause API errors.

Links and References

Discussion