ActionNotionUpdated June 2026

How do I filter and sort rows from a Notion database?

Short answer: Drop the "NotionQuery Database" action anywhere in your workflow, map the inputs from upstream nodes, and publish.

Inputs

The fields this action accepts.

Every field can be mapped from an upstream trigger, AI step, table row, or hard-coded literal.

FieldTypeRequiredDescription
Database ID
database_id
stringRequiredNotion database ID — a UUID with hyphens. Open the database as a full page, copy the URL, format as 8-4-4-4-12 hex.
Filter (JSON)
filter
stringOptionalNotion filter object as JSON. See Notion API docs for filter syntax.
Sort By Property
sort_property
stringOptionalName of the property to sort by
Sort Direction
sort_direction
optionsOptionalSort Direction. Options: Descending, Ascending
Page Size
page_size
stringOptionalNumber of rows to return (max 100)
Sample request
{
"database_id": "e.g. a1b2c3d4e5f6...",
"filter": "{\"property\": \"Status\", \"select\": {\"equals\": \"Done\"}}",
"sort_property": "e.g. Created time",
"sort_direction": "{{trigger.sort_direction}}",
"page_size": "100"
}
Returns
{
"object": "list",
"results": [
{
"id": "row-id-123",
"object": "page",
"properties": {
"Name": {
"title": [
{
"plain_text": "Task 1"
}
]
},
"Status": {
"select": {
"name": "In Progress"
}
}
}
}
],
"has_more": false
}

Use these fields in downstream nodes for routing, logging, or error handling.

Triggered by

Apps that pair well as the trigger for Query Database.

Any of these apps can fire this action as part of a workflow.

FAQ

Questions about Query Database.

What does the Query Database action do in Notion?
Queries rows from a Notion database with optional filter and sort. The workhorse read; supports compound filters across properties.
What inputs does Query Database require?
Required: Database ID. Every input accepts a static value or a variable from any upstream node in your workflow.
Can I use dynamic inputs from earlier workflow nodes?
Yes. Any field on this action can pull values from upstream nodes, whether that's a form response, a trigger payload, an AI output, or a lookup result.
What happens if Notion returns an error?
The workflow pauses on the failed node, the error message is captured in the run log, and you can retry the run with one click. Auto-retry policies are configurable per workflow with exponential backoff up to 5 attempts.
Does Query Database support batch operations?
Yes. Run Query Database inside a Loop node to process arrays. Tiny Command handles Notion's rate limits automatically so you don't have to throttle manually.
More actions

Other Notion actions.

Action
Append Content
Appends content blocks (paragraphs, headings, to-dos, bullets, code, callouts) to the body of a Notion page. The default way to grow a document programmatically.
Action
Create Database
Creates a new database as a child of an existing Notion page with the supplied property schema. Used for templated workspace provisioning.
Action
Create Page
Creates a new page in a Notion database (adds a row) or as a child of another page. Pass properties for database columns and children for body blocks.
Action
Delete Block
Deletes (archives) a block from a Notion page. Notion treats this as soft-delete; the block can be restored from the trash for 30 days.
Action
Get Block
Retrieves a single block by ID with its type and content. Used to inspect a block before updating or to render a specific element.
Action
Get Database
Retrieves a Notion database with its full property schema (column definitions, types, options). Used to dynamically populate column pickers or validate before write.

Send query database from your workflows.

Triggered by anything in the catalog. Free tier available. No credit card.