Notion Advanced icon

Notion Advanced

Full-featured Notion node with exhaustive block and formatting support using existing credentials

Overview

The node provides advanced integration with Notion, focusing on full-featured support for managing Notion pages, blocks, databases, and users. Specifically, the Page - Search operation allows users to search for pages within their Notion workspace using a query string and optional filters.

This operation is useful when you want to programmatically find pages matching certain criteria without manually browsing Notion. For example, you could search for all pages containing a keyword or filter pages by specific properties such as creation date or archived status.

Practical examples:

  • Searching for project documentation pages containing a specific term.
  • Filtering pages that are archived or have a particular icon.
  • Automating workflows that need to retrieve page metadata based on dynamic queries.

Properties

Name Meaning
Search Query The text query string used to search pages in Notion.
Filter A JSON string representing additional search filters to narrow down results.
Additional Fields Collection of optional fields for the page (Icon, Cover image URL, Archive status). Not used directly in search but available for other operations.

Details on "Filter" property options

The filter must be provided as a valid JSON string describing the filter object according to Notion's API. If omitted or invalid, the node defaults to filtering only objects of type "page".

Output

The output is a JSON object with the following structure:

{
  "object": "list",
  "results": [ /* array of page objects matching the search */ ],
  "count": /* number of results */
}
  • results contains an array of page objects returned by Notion's search endpoint.
  • Each page object includes metadata about the page such as its ID, properties, and other relevant details.
  • The output does not include binary data.

Dependencies

  • Requires a valid Notion API credential configured in n8n to authenticate requests.
  • Uses Notion's official REST API endpoints for searching pages.
  • No additional external services are required beyond the Notion API.

Troubleshooting

  • Invalid Notion API credentials: The node will throw an error if the provided API key or token is invalid or missing. Ensure your Notion integration token is correctly set up in n8n credentials.
  • Invalid JSON in Filter: If the filter property contains malformed JSON, the node falls back to a default filter for pages only. To avoid unexpected results, ensure the filter JSON is valid and matches Notion's filter schema.
  • Empty or no results: If the search query or filter yields no pages, the results array will be empty. Verify your query and filter parameters.
  • API rate limits: Frequent or complex searches may hit Notion API rate limits. Implement retry logic or reduce request frequency if needed.

Links and References

Discussion