Combine conditions
A condition is a property plus a condition expression. You can combine them withand and or, up to 2 levels deep.
property accepts a property name or ID. Each array holds up to 100 items, and a request holds up to 1,000 conditions.
Property conditions
button properties can’t be filtered. The response is 400 Unable to filter based on a button.
A filter key that doesn’t match the property returns 400, with these exceptions: title, rich_text, url, email, and phone_number properties accept the rich_text key; created_by and last_edited_by properties accept the people key; and created_time and last_edited_time properties accept the date key.
Text conditions
- Values are trimmed before comparing, and case is ignored, including for
equals. - A value that’s empty after trimming matches every row, including
equals: "".
Select conditions
- A value is one name or an array of names. An array matches any of them.
- Names are case-sensitive. An unknown name returns 400
select option "X" not found for property "P". Available options: ... statusalso accepts the group namesTo-do,In progress, andComplete, which match every option in that group.- A single empty string means no condition.
Date conditions
- A value is ISO 8601 text, or one of
today,tomorrow,yesterday,one_week_ago,one_week_from_now,one_month_ago,one_month_from_now. - A value with no time means 00:00 UTC that day.
equalscovers that whole day, andafterstarts from the next day. - A value with a time and no offset is read as UTC. A date range is compared by its start date.
- The value for conditions like
past_weekis an empty object{}.this_weekis the 7 days from Sunday UTC.past_weekandnext_weekinclude today.
People and relation conditions
The value is an ID."me" in people, created_by, or last_edited_by matches nothing, because an integration isn’t a person.
To find rows an automation wrote, use { "property": "Last edited by", "last_edited_by": { "contains": "00000000-0000-0000-0000-000000000003" } }.
Filter by timestamp
You can filter by a row’s created or edited time without a property, even in a database with no such property. Comparison uses values truncated to the minute.Sorts
sorts is an array of up to 100 items, applied in order.
directionisascendingordescending.timestampiscreated_timeorlast_edited_time. Sorting uses the stored time, not the time truncated to the minute.- With no sort, or when values tie, the most recently created rows come first.
- Empty values come last in both directions.
- Text ignores case, and on a tie, uppercase comes first.
selectsorts by option order.