Search Notion
Requirements
Search query (natural language), optional target database, optional filters (status, date range, tags, assignee)
2
Determine the query type:
- Workspace search: Find pages by title across all shared content
- Database query: Filter entries in a specific database
If the user mentions a database name or asks about entries with properties (status, due date, tags), this is a database query. Check Connection Profiles for matching databases.
If searching generally ("find my notes about X"), use workspace search.
3
For database queries:
- Identify the target database from the profile
- Translate natural language filters to Notion filter syntax:
- "due this week" → date filter with current week range
- "urgent" or "high priority" → select/multi-select filter
- "assigned to me" → people filter
- "completed" → checkbox or status filter
For workspace search:
- Use the search query directly
- Optionally filter to pages or databases only
4
Execute the search/query.
Present results intelligently:
- For database queries: Group by relevant property (status, date), show key fields
- For workspace search: Show title, type (page/database), last edited
- For long results: Summarize first ("Found 23 tasks, 8 are overdue")
- Offer to show more details or apply additional filters
5
If results are empty:
- For database queries: Suggest alternative filters or confirm database name
- For workspace search: Suggest related search terms or check if content is shared
To run this task you must have the following required information:
> Search query (natural language), optional target database, optional filters (status, date range, tags, assignee)
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 Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/content.notion.guide.md` (Notion API reference for search and queries)
2. Determine the query type:
- **Workspace search**: Find pages by title across all shared content
- **Database query**: Filter entries in a specific database
If the user mentions a database name or asks about entries with properties (status, due date, tags), this is a database query. Check `./documents/connections/[service-name].md` for matching databases.
If searching generally ("find my notes about X"), use workspace search.
3. For database queries:
- Identify the target database from the profile
- Translate natural language filters to Notion filter syntax:
- "due this week" → date filter with current week range
- "urgent" or "high priority" → select/multi-select filter
- "assigned to me" → people filter
- "completed" → checkbox or status filter
For workspace search:
- Use the search query directly
- Optionally filter to pages or databases only
4. Execute the search/query.
Present results intelligently:
- For database queries: Group by relevant property (status, date), show key fields
- For workspace search: Show title, type (page/database), last edited
- For long results: Summarize first ("Found 23 tasks, 8 are overdue")
- Offer to show more details or apply additional filters
5. If results are empty:
- For database queries: Suggest alternative filters or confirm database name
- For workspace search: Suggest related search terms or check if content is shared