Actions6
Overview
This node operation "Search and Retrieve Pages" allows users to search for Notion pages by title, content, or properties and retrieve their information. It is useful when you want to find specific pages within your Notion workspace based on keywords or criteria, or simply list all pages up to a certain limit.
Common scenarios include:
- Searching for project documentation pages containing certain keywords.
- Retrieving a list of meeting notes pages created recently.
- Finding pages tagged with specific properties or titles.
- Getting an overview of pages for further processing or automation.
For example, you can enter a search query like "marketing plan" to get all pages related to marketing plans, or leave the search query empty to retrieve all pages (up to the max results limit).
Properties
| Name | Meaning |
|---|---|
| Search Query | Search terms to find pages. Leave empty to get all pages. |
| Additional Options | Collection of optional parameters: • Icon: Emoji icon for the page (e.g., 📝, 🎯, 📊) • Cover Image URL: URL of cover image for the page • Max Results: Maximum number of results to return (1-100), default 20 |
Output
The output JSON contains the following fields:
totalResults: Number of pages found matching the search query (integer).pages: An array of page objects returned by the Notion API search endpoint. Each page object includes metadata such as page ID, title, URL, and other Notion page properties.message: A human-readable message summarizing the result, e.g., "Found 10 pages".
The node does not output binary data.
Dependencies
- Requires valid Notion API credentials (an API key or token) configured in n8n to authenticate requests.
- Uses the Notion API
/searchendpoint to perform the page search. - The maximum number of results per request is capped at 100 by the Notion API; the node enforces this limit even if a higher number is specified.
Troubleshooting
- Invalid Notion API credentials: The node will throw an error if the provided credentials are invalid or missing. Ensure that the API key/token is correctly set up in n8n credentials.
- No results found: If the search query is too restrictive or misspelled, no pages may be returned. Try broadening the search terms or leaving the query empty to retrieve all pages.
- Max Results out of range: The
maxResultsproperty must be between 1 and 100. Values outside this range will be adjusted or cause errors. - API rate limits: Frequent or large searches might hit Notion API rate limits. In such cases, wait and retry later.
Links and References
- Notion API Documentation - Search
- Notion AI Tool GitHub Repository (for general usage and examples)