List Pages
List Pages returns the pages (rows) of a Notion database. You can get all of them or filter and sort them, for example only the tasks with status “Done” or the most recent first.
When to use it
- You want to review the pending tasks of a Notion database every morning.
- A flow has to go through the orders in a database to notify customers.
- You need the ID of a page in the database to update it later.
Configuration
You need a Notion API credential with your Notion integration’s token. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Notion API credential used to access your Notion workspace. |
| Database ID | The ID of the database you want to query. |
| Database query (JSON) | The query’s filters and sorting, written in Notion’s format. Empty, the pages are returned without filtering or sorting. |
An example query that returns the pages with status “Done”, newest first:
{"filter": {"property": "Status", "select": {"equals": "Done"}}, "sorts": [{"timestamp": "created_time", "direction": "descending"}]}Output
The Data output returns one item per page found, with its ID, its link, its creation date, its last edit date and all its properties.
You get the first batch of results Notion returns for a query (up to 100 pages). If the database has more, use filters to narrow it down.
If the query is badly written or Notion rejects it, the flow does not stop: the output carries a message that explains why.
Example
A support team wants a daily review of open tickets.
- Add List Pages and enter the ID of the “Tickets” database in Database ID.
- In Database query (JSON) write a filter on the status property, for example
{"filter": {"property": "Status", "select": {"equals": "Open"}}}. - Connect the output to an agent that writes the summary and emails it to the team.
Good practices
- Check first with List Database Properties what the properties are called and their type: the filter depends on the type.
- Filter in the query instead of fetching the whole database and filtering afterwards: it is faster and you avoid falling short.
Related components
- List Database Properties: the database’s structure.
- Page Content Viewer: read a page’s content.
- Update Page Property: change a page’s properties.
- Search: search pages and databases by title.