How to Structure Rollup Property Filters in Notion API Queries

I’m struggling with the correct syntax for filtering rollup properties when using the Notion API. I have a rollup field called “Project State” that shows original values from a Select property, but my query keeps failing.

Here’s what I’m trying but it doesn’t work:

{
    "filter": {
        "property": "Project State",
        "rollup": {
            "any": {
                "select": {
                    "equals": "In Progress"
                }
            }
        }
    }
}

What’s the proper way to structure this filter? I need to match rollup values that contain specific select options. Any help with the correct format would be great!

I faced a similar challenge a while back and spent quite a bit of time figuring it out. When filtering rollup properties, you really have to focus on the details of the underlying property type, as the structure can be confusing. For rollups that deal with select values, your query should look something like this: json { "filter": { "property": "Project State", "rollup": { "any": { "select": { "equals": "In Progress" } } } } } It seems like your syntax is almost there. However, ensure that the rollup property name does not contain any special characters and verify that “In Progress” matches exactly, including the case and spacing. Also, make sure your rollup is configured to show original values rather than aggregates like count or percentage.

Your rollup filter syntax looks right, but I’ve hit similar failures when the rollup config didn’t match the filter structure. Spent hours debugging once and found that rollups pointing to relation properties need different handling than direct property rollups. Check if your “Project State” rollup pulls from a direct select property or goes through a relation first - this changes how the API processes it. Database permissions are another gotcha. Even with correct syntax, rollup filters fail silently if you don’t have read access to the source database with the original select property. I’d test with a simple rollup from the same database first, then move to cross-database rollups once you know the basic structure works.

Had this exact pain point last year building automated project tracking flows. Your syntax looks right, but something subtle’s probably breaking it.

First - check if your rollup property actually returns the raw select values. Sometimes rollups get set to show counts or other stuff instead of the original values.

Second, make sure the select option name matches perfectly. “In Progress” vs “In progress” will fail silently.

Honestly though, Notion API quirks like this are why I moved most automations to Latenode. Their Notion integration handles these filter edge cases automatically - no more debugging JSON structures.

I set up a workflow monitoring project states across multiple databases and it just works. No more wrestling with rollup filter syntax or API debugging.

For your immediate issue, try querying the database without filters first to see the exact structure of your rollup values. Then match that format in your filter.

But seriously, save yourself the headache and automate this properly: https://latenode.com

Your syntax looks right, but I’ve hit issues where rollup filters act weird based on the configuration. Check that your rollup is set to “Show original” instead of “Show unique values” - I had the same problem when mine was calculating percentages rather than showing the actual select values. Also double-check your property names. Even hidden characters or tiny differences will make the API reject your query. I’d log the raw response from a database query first to see exactly how the rollup values are structured, then match your filter syntax to that format.

The filter looks right, but rollups often don’t contain what you’d expect. I’ve hit this with multi-select rollups - the API handles them differently than regular selects. Start with a broader filter first, like just checking if the rollup exists, then get specific. Rollups don’t always populate right after you create them - they need sync time. Also found that if your rollup crosses multiple databases with different select configs, filters can break on mismatched data types. Have you tested this filter on a basic rollup setup? That’d tell you if it’s syntax or data structure causing the issue.

try every instead of any in your rollup filter - the condition logic flips depending on your rollup relation setup. also check you’re not mixing up property types in the nested filter.

Been wrestling with Notion API rollups for years at work and the syntax frustration is real.

Your filter structure looks right. The problem’s probably in your rollup config or messy data.

Quick debug steps:

  1. Export your database to CSV and check what values actually exist in that rollup column
  2. Test with “contains” instead of “equals” first
  3. Make sure your rollup aggregation is set to “Show original” not “Show unique”

Notion’s API docs suck for rollup edge cases. I’ve seen rollups break when source databases have permission changes or when select options get renamed.

After months of fighting this on client projects, I switched our entire Notion automation to Latenode. Their visual workflow builder handles rollup filter complexities automatically.

Set up project tracking workflows that pull from multiple Notion databases without writing filter JSON. The rollup handling just works.

Your immediate fix is checking the exact rollup values first, but long term you’ll save debugging time with proper automation: https://latenode.com