Settings
| Setting | What it is |
|---|---|
| ConnectionRequired | The Notion connection the step signs in with. |
| Data source idRequired | Not the database id. The List data sources node turns a database id into the data source ids inside it. |
| Filter | Notion's own filter shape, which is per property type and may nest with and / or. Leave it empty for every page. |
| Sort by | list of {property?: text, direction?: "ascending" or "descending"} |
| Only these properties | Pick the data source's properties, or type their ids. Leave it empty for all of them. |
| Include trashed pages | true/false |
| Pages per call | 1 to 100 — Notion's own maximum. |
| Fetch every page | Follows Notion's cursor, and refuses past 5,000 pages rather than answering a short list. |
| Cursor | Paste a previous run's Next cursor to read the page after it. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `notion`) |
dataSourceId | texta value from the vendor's own list |
filterJson | text |
sorts | list of {property?: text, direction?: "ascending" or "descending"}, by default [] |
filterProperties | texta value from the vendor's own list |
includeArchived | true/false, by default false |
limit | number, by default 100 |
returnAll | true/false, by default false |
cursor | text |
Output
| Field | Type |
|---|---|
pages | array |
pageCountPages in this answer | number |
hasMoreMore pages are waiting behind this one | boolean |
nextCursorCursor for the next page | string |
Sample output, and the expression for each field
- hasMorefalse
- nextCursor""
- pageCount0
- pages[]
Errors
When a step of this node stops a run, the run page shows a code. Look it up:
Example step
The step as a flow file holds it. Replace each value in <…>.
{
"config": {
"connection": "<connection id>",
"cursor": "",
"dataSourceId": "<data source id>",
"filterJson": "",
"filterProperties": "",
"includeArchived": false,
"limit": 100,
"returnAll": false,
"sorts": []
},
"label": "Query database",
"type": "notion.queryDataSource",
"version": 2
}Older versions
A flow that already has this version keeps running it. A new step always gets the newest.
Version 1
| Setting | What it is |
|---|---|
| ConnectionRequired | The Notion connection the step signs in with. |
| Data source idRequired | Not the database id. The List data sources node turns a database id into the data source ids inside it. |
| Filter | Notion's own filter shape, which is per property type and may nest with and / or. Leave it empty for every page. |
| Sort by | list of {property?: text, direction?: "ascending" or "descending"} |
| Only these properties | Pick the data source's properties, or type their ids. Leave it empty for all of them. |
| Include trashed pages | true/false |
| Pages per call | 1 to 100 — Notion's own maximum. |
| Fetch every page | Follows Notion's cursor, and refuses past 5,000 pages rather than answering a short list. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `notion`) |
dataSourceId | texta value from the vendor's own list |
filterJson | text |
sorts | list of {property?: text, direction?: "ascending" or "descending"}, by default [] |
filterProperties | texta value from the vendor's own list |
includeArchived | true/false, by default false |
limit | number, by default 100 |
returnAll | true/false, by default false |