The API keeps complaining about undefined fields. I’ve tried different property types and filter structures but no luck. What am I doing wrong? How can I properly construct this multi-condition filter?
hey mate, i’ve run into this too. the trick is to use ‘property’ for everything, even created_time. also, double-check ur property names match exactly what’s in ur database (case matters!). if ur still stuck, try breaking it down into smaller filters first and build up. good luck!
I’ve dealt with similar Notion API filter challenges. Your issue likely stems from the filter structure. The ‘timestamp’ field in your first condition is incorrect. Instead, use ‘property’ consistently for all conditions.
This structure maintains consistency across all filter conditions. Remember, property names are case-sensitive, so ensure they exactly match your database fields. If issues persist, verify your API version and permissions.
I’ve encountered similar issues with complex filters in Notion API queries. The key is to structure your filter object correctly. Here’s what worked for me:
For the ‘and’ operator, each condition needs to be a separate object within the array. Also, make sure you’re using the correct property names and filter types for each field.
Notice how I changed ‘timestamp’ to ‘property’ for the created_time filter. This should resolve the validation errors you’re getting. If you’re still having trouble, double-check that your property names exactly match those in your Notion database, as they’re case-sensitive.