Question

Return a single Notion database row where custom date field is the oldest date

  • 4 December 2023
  • 3 replies
  • 44 views

How do I retreive a single row from a Notion database, based on a custom date field where the date is the oldest date in the database?

Using the Find Database Item in Zapier returns the most recently edited page first, so that won’t work.

I tried using the Notion API, but it doesn’t seem to allow me to limit the responses to only one single row (i tried using the page_size parameter, but still returns all rows):

{
"filter": {
"property": "Last published",
"date": {
"is_empty": false
}
},
"sorts": [
{
"property": "Last published",
"direction": "ascending"
}
],
"page_size": 1
}

 

Any idea how I get simply get the one row from my Notion database with the oldest “Last published” date, so I can use that data in Zapier?


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Hi @Simenf 

Good question.

Try using this Zap action: Notion - App Extensions

There is AI to help configure the action.

 

Hi @Simenf 

Good question.

Try using this Zap action: Notion - App Extensions

There is AI to help configure the action.

 

Already did actually! It was able to do almost everything I asked it too, besides limiting the results to one single row…

Userlevel 7
Badge +14

@Simenf 

You can try to use the Looping app followed by a Filter step to process only the first iteration.

https://zapier.com/apps/looping/help