Back to Autogpt

Notion Read Database

docs/integrations/block-integrations/notion/read_database.md

0.6.442.2 KB
Original Source

Notion Read Database

<!-- MANUAL: file_description -->

Blocks for querying and reading data from Notion databases.

<!-- END MANUAL -->

Notion Read Database

What it is

Query a Notion database with optional filtering and sorting, returning structured entries.

How it works

<!-- MANUAL: how_it_works -->

This block queries a Notion database using the Notion API. It retrieves entries with optional filtering by property values and sorting. The block requires your Notion integration to have access to the database.

Results include all property values for each entry, the entry IDs for further operations, and the total count. The database connection must be shared with your integration from Notion.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
database_idNotion database ID. Must be accessible by the connected integration.strYes
filter_propertyProperty name to filter by (e.g., 'Status', 'Priority')strNo
filter_valueValue to filter for in the specified propertystrNo
sort_propertyProperty name to sort bystrNo
sort_directionSort direction: 'ascending' or 'descending'strNo
limitMaximum number of entries to retrieveintNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
entriesList of database entries with their properties.List[Dict[str, Any]]
entryIndividual database entry (yields one per entry found).Dict[str, Any]
entry_idsList of entry IDs for batch operations.List[str]
entry_idIndividual entry ID (yields one per entry found).str
countNumber of entries retrieved.int
database_titleTitle of the database.str

Possible use case

<!-- MANUAL: use_case -->

Task Management: Query a Notion task database to find items with a specific status or assigned to a particular person.

Content Pipeline: Read entries from a content calendar database to identify posts scheduled for today or this week.

CRM Sync: Fetch customer records from a Notion database to sync with other systems or trigger workflows.

<!-- END MANUAL -->