Actions6
Overview
This node provides an AI-powered interface to interact with Notion pages and databases. Specifically, the "Search and Retrieve Pages" operation allows users to search for Notion pages based on a query string, filter by content or title, or retrieve recently modified pages. It is useful for quickly finding relevant pages within a Notion workspace without manually browsing.
Common scenarios include:
- Searching for project documentation pages containing specific keywords.
- Retrieving recently updated meeting notes.
- Filtering pages by title to locate specific documents.
For example, a user can input a search term like "marketing plan" and get a list of pages where this phrase appears either in the title or content, facilitating quick access to relevant information.
Properties
| Name | Meaning |
|---|---|
| Search Query | Search terms to find pages. Leave empty to get all pages. |
| Search Type | Options: • All Content — Search in page titles and content • Titles Only — Search only in page titles • Recent Pages — Get recently modified pages |
| 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 — Whether to return full page content or just metadata (boolean) • 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 criteria.pages: An array of page objects returned by the Notion API search endpoint. Each object includes metadata about a page such as its ID, properties, and other details.message: A summary string indicating how many pages were found.
If the "Return Full Content" option is enabled, the node may include full page content; otherwise, it returns metadata only.
No binary data output is produced by this operation.
Dependencies
- Requires a valid Notion API key credential configured in n8n.
- The node uses the Notion API's
/searchendpoint to perform page searches. - No additional external services are required 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.
- Empty search results: If no pages are found, verify the search query and type. Using an empty query returns all pages up to the max results limit.
- Max Results limits: The maximum number of results returned is capped at 100 by the Notion API. Setting a higher number will be automatically limited.
- API rate limits: Frequent or large queries may hit Notion API rate limits. Implement retry logic or reduce request frequency if errors occur.
- Malformed additional options: Ensure that any JSON or boolean inputs in additional options are correctly formatted.