Query Database
notion.query_database
ActionBusiness appsconnection required
Calls the Notion API POST /databases/{id}/query and returns matching pages.
Query pages from a Notion database with optional filter and sort.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Notion
- Secret shape
- the integration token, or {"token": "…"}
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
database_id Database id to query. | string | Yes | — | — | — |
filter Notion filter object. | object | No | — | — | — |
sorts Notion sorts array. | array | No | — | array of object | — |
page_size Max pages to return (1-100). | number | No | — | ≥ 1 | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
results Matching pages (Notion page objects). | array | — |
count Number of pages returned this call. | number | — |
has_more True if more pages exist beyond page_size. | boolean | — |
{
"count": 0,
"has_more": false,
"results": []
}Notes
- Share the database with your integration in Notion first, or the query returns 'Could not find database'.
See Query Database run in a workflow.
In a technical demo we add the Notion connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.