Database
RequiredTextData source ID of the database to read.
248104cd-477e-80a9-8a1b-e4f8b0f8c1d2
Get rows from a database, filtered and sorted.
First, connect Notion in Services. Then open Actions → + → Notion and choose Query a Database.
To find this direct request action, choose Every Notion endpoint in the integration’s picker. The setup guide also explains the dedicated forms for common tasks.
The read counterpart to Create a Page. Filter and Sorts take Notion's own query shapes, which reference the person's column names.
A query returns at most 10,000 rows however many pages are fetched.
Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.
Data source ID of the database to read.
248104cd-477e-80a9-8a1b-e4f8b0f8c1d2
A Notion filter object. Omit to return every row.
{"property":"Done","checkbox":{"equals":false}}A list of sort objects, applied in order.
[{"timestamp":"created_time","direction":"descending"}]1–100.
100
Bind this to a slot to page from a Repeat loop instead.
In the action editor, open Output → Returned Value to choose fields for your shortcut. These are the response fields described by the app; a service may omit an optional field or return an empty list. JSON File contains the full response.
| Returned field | Type | Meaning |
|---|---|---|
has_more | boolean | Whether another page exists. |
results | array | A list of values. |
results[].id | string | Text value. |
results[].url | string | Text value. |
results[].created_time | string | Text value. |
results[].last_edited_time | string | Text value. |
results[].properties | object | Keyed by your own column names. |
If the result is unexpected, open Logs in Shortcutify, select the run, and inspect this step’s inputs and response.
This action supports multiple pages of results. Open its Fetch setting to retrieve more pages when one page is not enough. Each page adds a service request.
Request: POST https://api.notion.com/v1/data_sources/{data_source_id}/query
Action identifier: notion.datasource.query.v1
No additional per-action permissions are declared in the app’s catalog. The integration’s connection and account access rules still apply.
| Input | Request key | Location |
|---|---|---|
| Database | data_source_id | path |
| Filter | filter | body |
| Sorts | sorts | body |
| Page Size | page_size | body |
| Start Cursor | start_cursor | body |