I’m stuck trying to filter Notion database entries with an HTTP request in Zapier. The built-in actions don’t cover multiple items or params.
I can get all items with a POST request to https://api.notion.com/v1/databases/[database_id]/query
, but filtering is tricky.
I want to filter by ‘Approved’ (checkbox) and ‘Episodes’ (single-select). Their IDs are IJGI
and bacf6208-4106-4e4c-9caa-7780af3f74d5
.
I’ve tried:
https://api.notion.com/v1/databases/[database_id]/query?filter_properties=lJGI&filter_properties=bacf6208-4106-4e4c-9caa-7780af3f74d5
But I keep getting a 400 error: ‘The schema for the database with the following ID is malformed’.
I’ve checked the database ID, integration permissions, and headers (auth, content-type, notion-version).
Other query formats like /query?checkbox=true
didn’t work either.
Any ideas what I’m doing wrong? How can I properly filter Notion database properties with an HTTP request in Zapier?
I’ve dealt with this exact issue before, and it can be frustrating. The key is to structure your filter correctly in the request body. Here’s what worked for me:
Send a POST request to https://api.notion.com/v1/databases/[database_id]/query with the filter in the body as JSON. For your specific case, try this:
{
“filter”: {
“and”: [
{
“property”: “Approved”,
“checkbox”: {
“equals”: true
}
},
{
“property”: “Episodes”,
“select”: {
“is_not_empty”: true
}
}
]
}
}
This should filter for approved items with a non-empty Episodes field. Adjust the ‘Episodes’ part if you’re looking for a specific value. Remember to set the correct headers (Authorization, Content-Type, and Notion-Version) in your Zapier HTTP request.
hey there! i’ve had some luck with this. try putting the filter in the request body as JSON, not in the URL. something like:
{“filter”: {“property”: “Approved”, “checkbox”: {“equals”: true}}}
make sure to use a POST request. hope that helps!
I’ve encountered a similar issue when working with Notion’s API through Zapier. The problem lies in how you’re structuring the filter in your HTTP request. Instead of using query parameters, you need to include the filter in the request body as JSON.
Try this approach:
- Set up a POST request to
https://api.notion.com/v1/databases/[database_id]/query
- In the request body, include a JSON object with your filter criteria
Here’s an example of what the body should look like:
{
"filter": {
"and": [
{
"property": "Approved",
"checkbox": {
"equals": true
}
},
{
"property": "Episodes",
"select": {
"equals": "Your_Episode_Value"
}
}
]
}
}
Make sure to replace ‘Your_Episode_Value’ with the actual value you’re filtering for. This structure should resolve your 400 error and allow you to filter the database entries as needed.