I'm trying to use an HTTP request to filter entries from a Notion database. There are currently built-in Zapier actions for creating, updating, and finding a database item, but not multiple and not with params.
Currently, I can retrieve all database items with a POST request that looks like this:
https://api.notion.com/v1/databases/[database_id]/query
Notion provides the following format to query and filter items
https://api.notion.com/v1/databases/[database_id]/query?filter_properties=[property_id_1]&filter_properties=[property_id_2]
I'm trying to filter two properties: the checkbox property that's named "Approved", and a single-select property named "Episodes". Retrieving all database items in Zapier shows the property IDs should be IJGI
and bacf6208-4106-4e4c-9caa-7780af3f74d5
, respectively.
Screenshot of Notion API request test data
From my understanding, this means my query should look something like this:
https://api.notion.com/v1/databases/[database_id]/query?filter_properties=lJGI&filter_properties=bacf6208-4106-4e4c-9caa-7780af3f74d5
Tests unfortunately keep yielding error 400 and the note: The schema for the database with the following ID is malformed.
I have double-checked that my database ID is correct, my database is shared with my integration, and headers include authorization, content-type, and notion-version.
Screenshot of Zapier Notion API request URL
Screenshot of Zapier Notion API request with headers
I have also tried a variety of other more traditional query string formatting types, such as /query?checkbox=true
. All yielded error messages.