Search Notion
Requirements
What to find or filter. Can be a search ('find my tasks database') or a database query ('tasks due this week').
Instructions
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
3
Determine the operation:
- SEARCH: Finding pages/databases by name ("where's my tasks database", "show me my databases")
- QUERY: Getting entries from a known database with filters ("tasks due this week", "show entries in X")
CheckConnection Profiles first—the database or page might already be known.
4
Based on operation type, run ONE of these:
For SEARCH: Run Search Notion Workspace with args: search query, type ('database'/'page'/'all'), limit (20 targeted, 50 browsing), output path (
Notion Search Results). Present results grouped by type.
For QUERY: First resolve the database ID from profile or search. Then run Query Notion Database with args: database ID, filter JSON (or empty), sort JSON (or empty), limit (50 default, 100 comprehensive), output path (
Notion Query Results). Present results as a readable table.
5
For large result sets (50+), summarize and offer to narrow or paginate.
To run this task you must have the following required information:
> What to find or filter. Can be a search ('find my tasks database') or a database query ('tasks due this week').
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. [Read Notion Agent Rules]: Read the documentation in: `./skills/sauna/[skill_id]/references/notion.workspace.rule.md` (Interpretation and property mapping)
2. [Read Notion API Reference]: Read the documentation in: `./skills/sauna/[skill_id]/references/notion.workspace.reference.md` (Filter syntax for database queries)
3. Determine the operation:
- SEARCH: Finding pages/databases by name ("where's my tasks database", "show me my databases")
- QUERY: Getting entries from a known database with filters ("tasks due this week", "show entries in X")
Check `./documents/connections/[service-name].md` first—the database or page might already be known.
4. Based on operation type, run ONE of these:
For SEARCH: Run `./skills/sauna/[skill_id]/scripts/notion.workspace.search.js` with args: search query, type ('database'/'page'/'all'), limit (20 targeted, 50 browsing), output path (`./documents/tmp/notion-search.json`). Present results grouped by type.
For QUERY: First resolve the database ID from profile or search. Then run `./skills/sauna/[skill_id]/scripts/notion.workspace.query.js` with args: database ID, filter JSON (or empty), sort JSON (or empty), limit (50 default, 100 comprehensive), output path (`./documents/tmp/notion-query.json`). Present results as a readable table.
5. For large result sets (50+), summarize and offer to narrow or paginate.