Help

Re: Voiceflow: Multiple filterbyFormula not working when "=0" contained inside var

Solved
Jump to Solution
328 0
cancel
Showing results for 
Search instead for 
Did you mean: 
EasyAI
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi, this is a Voiceflow specific question, but I was hoping someone might have some ideas.

I'm making an API call from Voiceflow using a multiple filterbyFormula to exclude words. This is what it looks like:

https://api.airtable.com/v0/appname/tablename?fields%5B%5D=Title&fields%5B%5D=Link&filterByFormula=AND(FIND(%22Long%22,%20%7BHair%20(Style,Color)%7D)%20%3E%200,%20FIND(%22Very%22,%20%7BHair%20(Style,Color)%7D)%20%3D%200 )

The above works without issue. The problem is that my filterbyFormula changes often and needs to be contained within a variable so my actual call from Voiceflow looks like this:

https://api.airtable.com/v0/appname/tablename?fields%5B%5D=Title&fields%5B%5D=Link&filterByFormula=AND({filter1 })

This is working fine when I'm looking for a Match, i.e when {filter1} = FIND("Long", {Hair (Style,Color)})>0

But if try for No match, i.e. when {filter1} = FIND("Very", {Hair (Style,Color)})=0, I get the INVALID_FILTER_BY_FORMULA error. So the problem seems to be tied to the "=0". 

TLDR -- When I store my filterbyFormula in a Voiceflow variable, ">0" gets returned but "=0" gives me error

I've tried https://codepen.io/airtable/ but it didn't solve my problem, so I'm worried it could be on the Voiceflow side. But I welcome any ideas from Airtable pros here.

thanks!

2 Solutions

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Hmm, could I confirm that when you tried the formula with the "=0" with something like Postman it worked fine?  In Voiceflow, are you able to change that "=" to be "%3D" to see if that helps?

See Solution in Thread

EasyAI
5 - Automation Enthusiast
5 - Automation Enthusiast

Okay, so I just tried replacing my "%3D"' with "="' and it works. Strange, as I had it that way before and it wouldn't work. Anyway, it's working now!

See Solution in Thread

4 Replies 4
TheTimeSavingCo
18 - Pluto
18 - Pluto

Hmm, could I confirm that when you tried the formula with the "=0" with something like Postman it worked fine?  In Voiceflow, are you able to change that "=" to be "%3D" to see if that helps?

EasyAI
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Adam,

The formula I'm using includes the %3D. (https://api.airtable.com/v0/appname/tablename?fields%5B%5D=Title&fields%5B%5D=Link&filterByFormula=AND(FIND(%22Long%22,%20%7BHair%20(Style,Color)%7D)%20%3E%200,%20FIND(%22Very%22,%20%7BHair%20(Style,Color)%7D)%20%3D%200 ) 

It's working fine written out, but if I put in variable like this --> https://api...=AND({variable })  then I receive the error.

However, I ONLY receive the error when trying to exclude values (when %3D0, is involved). Strangely, I can include as many find values (%3E), as I want and it will continue working but the exclusion is tripping it up.

Thanks for any thoughts or suggestions. I'm stuck and not getting any answers from the Voiceflow side of things.

EasyAI
5 - Automation Enthusiast
5 - Automation Enthusiast

Okay, so I just tried replacing my "%3D"' with "="' and it works. Strange, as I had it that way before and it wouldn't work. Anyway, it's working now!

Hahaha sigh, I've been there.  Glad you got it sorted!