Baserow to Make.com integration... API calls with multiple filters

I have been running around in circles and not sure what I am doing wrong. I need to use the API calls from Make.com to Baserow to return a filtered set of rows where there are more than one element to filter on. The instructions on using the API calls from Make stop before showing the last step of how to format the query. :slight_smile: I have other calls in the same flow using the List Rows module that work fine, so I know the connection is all good and the data is passing through, just not sure how to format the API call so it works. Can anyone see what I am doing wrong? (The json comes direct from baserow.io/api-docs’s handy “Open filters parameter builder”. I tried the json format and the query format, no luck.
I get this error in Make with the json query format.

BundleValidationError

Validation failed for 1 parameter(s).

  • Array of objects expected in parameter ‘qs’.

Hi,

Welcome to the community!

Can you try to uncheck the Map checkbox so you can offer a key/value pair to the querystring? You now should be able to set the key to filters and offer the JSON part as the value.

Regards
Frederik

Thanks Frederik, really appreciate your assistance and I am enjoying working with Baserow so far. If I can just work out the query string I will be able to really have some fun. So I tried your suggestion but unfortunately that returns an UnknownError [400] [Collection].
I did find I had the URL wrong initially, but fixed that and can call the API without the query string ok, but just can’t get the query string formatted correctly. Corrected screenshot with your suggestion.

It is possible that the blocks from Make are not updated yet to work with the filters parameter since this was recently added to Baserow. You can also try to use the URL encoded query parameters instead of the JSON. This replaces all curly braces and other characters with a URL encoded variant.

In case this does not solve your problem, you still have 2 alternatives
Replace the querystring with the following:
key: filter__Status__single_select_equal
value: 1322870 (or whatever value you want)

Using a HTTP Make a request building block
This makes a request to the Baserow API using a standard HTTP building block. The consequence is that you need to do the authentication yourself:

Thanks so much! I will give that a try. :slight_smile:

I am making progress. I can now get the API query to work with the following format, with one final hurdle… how can I reach into the array to get the value? If I pass a string to search a field that is a string, all good, but if its an array (eg. Select list) I’m not sure how to format that. This is what currently works.


But this doesn’t…
image
But changing to __contains does work.
image
But not if passing the Integer for this pick list item, which is a little dangerous if you change the text of the option, it will break the process. :frowning: If anyone know how to filter on the ID instead of the text for the item that would be great. :slight_smile:
So… its working, a little clunky, but… its working. :slight_smile: I will document any other findings here for anyone else struggling with query strings in Make. :sweat_smile:

I should also not that I had to remove this from the query for it to work.
image

What field type is field_1811192?

There are several filter that you can apply to an element. Open the API documentation of your database and click on the item Filters on the left side to get an overview:

So, you can use equal or not_equal for text input. But for a single select field you need to use single_select_equal. For a linked field, you use link_row_has.

1 Like

Ah, so that is how those work! Wonderful. Yes, its a single select field and I tried that and it worked perfectly. Thank you so much, really appreciate the help! :green_heart:

For those following along the query now looks like this in Make.


First field is a Text field, second is a Single Select field.

I should have not spoken so quickly. :slight_smile: This approach has created another issue, there is a difference between how the List Rows module and the API call of List Rows returns the data. Here is the issue:

List Rows returns one bundle per row (the collection = the row in this case), which you can then pass into other functions such as text or integer aggregators.
image

List Rows via the API call returns a single bundle that includes the array of collections (rows) but buried down inside the body/results tag.

The issue is modules such as the aggregators don’t know how to handle this. “results” only returns the last row read. While is says there is a count of 4, only the last row is accessible in MAKE.
image

I suspect this is more a MAKE issue in how its unwrapping the API call maybe, but at this point I can’t find a solution to get down to the collections. So, stuck again. :sweat_smile:

@frederikdc could you please take another look here?

1 Like

Hi,

Normally, you should be able to use the Iterator block and set the results array as the input of the block. The output should be the bundels of the result are that are splitted.



1 Like

Magic, that works! Thanks so much for unraveling that mystery. :green_heart:
Just to show the flow in this example where I use the API call to get the filtered set of rows (two filters in this case), then use the Iterator to extract to collections, then sum up one field from the Payments table, then pass to the orders table to sum up the total orders, then fetch the members details and write out all the elements to a Remittance table.


Beautiful! One tiny addition to also flag the payment as processed to close out the process.