Actions16
Overview
The node provides advanced integration with Notion, enabling comprehensive interaction with Notion's API. Specifically, the Page - Search operation allows users to search for pages within their Notion workspace based on a query string and optional filters. This is useful for workflows that need to locate specific pages dynamically, such as retrieving project documentation, notes, or any content stored in Notion pages matching certain criteria.
Practical examples include:
- Automating retrieval of meeting notes by searching pages containing a specific keyword.
- Filtering pages by properties like creation date or tags using JSON filters.
- Integrating with other tools to fetch relevant Notion pages for further processing or reporting.
Properties
| Name | Meaning |
|---|---|
| Search Query | The text query string used to search pages in Notion. |
| Filter | A JSON string representing additional filter criteria to narrow down the search results. |
| Additional Fields | Collection of optional fields: • Icon: Page icon (emoji or image URL) • Cover: Page cover image URL • Archive: Boolean flag to archive the page (not applicable for search but part of general page fields) |
Output
The output is a JSON object with the following structure:
object: Always"list", indicating a list response.results: An array of page objects returned from the search query. Each item represents a Notion page matching the search criteria.count: Number of pages found.
This output can be used downstream in workflows to process or analyze the matched pages.
Dependencies
- Requires valid Notion API credentials configured in n8n to authenticate requests.
- Uses Notion's official API endpoints for searching pages.
- No additional external dependencies beyond the Notion API and n8n environment.
Troubleshooting
- Invalid Notion API credentials: The node will throw an error if the provided API key or token is invalid or expired. Ensure the credential is correctly set up and has sufficient permissions.
- Malformed JSON in Filter: If the filter property contains invalid JSON, the node defaults to filtering for pages only. To avoid this, ensure the filter JSON is well-formed.
- Empty or no results: If the search query or filter does not match any pages, the results array will be empty. Verify the query and filter parameters.
- API rate limits: Excessive requests may hit Notion API rate limits causing errors. Implement retry logic or reduce request frequency.