Skip to main content
Solved

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


  • New Participant
  • 2 replies

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!

Best answer by TheTimeSavingCo

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?

View original
Did this topic help you find an answer to your question?

4 replies

TheTimeSavingCo
Forum|alt.badge.img+18

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?


  • Author
  • New Participant
  • 2 replies
  • May 1, 2024
TheTimeSavingCo wrote:

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?


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.


  • Author
  • New Participant
  • 2 replies
  • May 1, 2024

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!


TheTimeSavingCo
Forum|alt.badge.img+18
EasyAI wrote:

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!


Reply