Skip to main content

Query Database

Queries a database in Notion.

This node is also exposed as an AI Agent tool.

This node has 1 input port and 1 output port.

Common Properties

Every node shares these.

  • Name — the node's display name on the canvas.
  • Color — the node's colour on the canvas.
  • Delay Before (sec) — wait this long before the node runs.
  • Delay After (sec) — wait this long after the node runs.
  • Continue On Error — carry on instead of failing the flow. Defaults to false.
info

When Continue On Error is true the error is not raised at all, so a Catch node will not see it either.

Inputs

PropertyFieldDescription
Client IDinClientIDClient ID from Connect node (optional if credentials provided)
Database IDinDatabaseIDThe ID of the database to query
FilterinFilterFilter object in Notion API format (optional). Example: {property: Status, status: {equals: Done}}
SortsinSortsArray of sort objects (optional). Example: [{property: Created, direction: descending}]

Outputs

PropertyFieldDescription
CountoutCountNumber of results returned
Has MoreoutHasMoreWhether more results are available
Next CursoroutNextCursorCursor for fetching next page of results
ResultsoutResultsArray of page objects matching the query

Options

PropertyFieldDescription
CredentialsoptCredentialsNotion integration token (optional - use instead of Connect node)
Page SizeoptPageSizeNumber of results per page (max 100)
Start CursoroptStartCursorCursor for pagination (optional)

Requirements

  • A Client ID from this package's Connect node, unless you set credentials directly on this node.
  • Notion Integration Token — Internal integration token from Notion. Create one at https://www.notion.so/my-integrations
    • value — Integration Token (password, required). Your Notion integration token (starts with 'secret_' or 'ntn_')

Store these in a Vault and reference the vault item from the node, rather than typing the secret into the property.

Get Database

Elsewhere in the package: Connect · Disconnect · Create Page · Get Page · Update Page · Archive Page · Append Blocks · Get Block Children · Search · Toolkit

See also