I´m currently working with a no/low-code platform called Voiceflow to create ChatBots. Just in case anybody is familiar with that.
I’m having trouble accessing the Webflow CMS Collection via the API. In my application, users select car brands and body types through buttons. I need to use the Webflow API to retrieve items that match the chosen search terms. Later, I’ll create cards with car data. Essentially, it’s a chatbot-based search.
I want Webflow to provide corresponding fields like “Price,” “Photo URLs,” “Performance,” etc., for the search terms, passing them to Voiceflow variables. Can anyone guide me on setting parameters and capturing responses in these scenarios:
a. When only one item is returned.
b. When there are multiple matching results (possibly arrays).
My coding skills are rusty, and I’d appreciate any help. I could make a workaround with Zapier/Make, but this could become messy and expensive to use in the later environment. Voiceflow provides the attached fields for making a GET API Call. I´m fine with the URL, API Auth, Key and so on but failing to provide the parameter to fetch the data.
I can successfully execute “List Collection Items” at a basic level. However, what I’m missing is something like a filter function.
Let’s say an item in the CMS Listing (Cars) has fields such as “Brand,” “Mileage,” “Power,” “Body Type,” “Year,” and “Price.” The user is searching for “Brand = BMW” and “Body Type = Coupe”. Both values are stored in separate variables and passed to the Webflow API.
Now, I want the Webflow API call to return all items from the collection and their values where “Body Type = Coupe” and “Brand = BMW,” matching the search criteria.
As a response, the values of the remaining fields, such as “Mileage,” “Power,” “Year,” and “Price,” should be passed as in voiceflow predetermined variables.
From a user experience perspective, it would look like this: The user wants to buy a car, selects the brand and body type, and receives all available cars with their associated data.
Does that provide enough description?
*The search function is chosen for illustrative purposes to simplify the example.