Escaping Characters - Tell me all about it

I think this deserves a help topic. I couldn’t figure out how to search your KB :expressionless:

I’ve seen this scattered about on different responses to various posts, but it always seems to be a sub topic and not the main topic. I mean to say that the need to escape characters seemed secondary to the main problem.

In my case, I am enriching data because in order to patch (update) an airtable request, I need to know the record ID, so my enriching request is a GET request with a filterByFormula

So when my GET request arrives at the front door of airtable’s API I want them to read it as follows…

https://api.airtable.com/v0/appNoofyaobuzines/tablename?filterByFormula={Variants: Id}=abc1234

Where you see abc1234 is where I will put {VariantId} which will work just fine. The issue is I need to escape the brackets or my request doesn’t appear to be able to work…

?filterByFormula="{What airtable calls the column but received by airtable in curly brackets}"={the search/filter value that will limit the results of the GET request}

From what I can tell, Airtable wants me to send the field I want to search in brackets because when I don’t I get a “INVALID_FILTER_BY_FORMULA” (and based on the community post hyperlinked above).

but when I do, Parabola says “URL refers to a column name that does not exist”, naturally because I can’t get it to escape the curly bracket in the endpoint.

I think it would be helpful to have a robust answer on this inconspicuous topic (or refer to one that has a complete answer) on the obvious ability/limitations/workarounds. (ex using , which I don’t believe works for curlys).

Also, if I am missing something, or can suggest a different approach (escaping the need to escape, if escaping is even possible) I would like to know that too.

Hey Dan,

Thanks for making a post about this topic. That’s a good point regarding escaped characters. Have you tried using this tool to try encoding your URL parameters? You’ll want to copy and paste the URL starting after the ?.

An easier workaround could be using a Filter rows step to target the Variant: Id column and filter based on the specified value.

Lastly, if you use the Pull from an API step using that URL structure the record Ids should be returned in a column called id.

Let me know if those methods will achieve the same end result you’re looking for.

I was hoping to get a response where others could see different scenarios where they could escape characters. It deserves it’s own article I believe. But perhaps there isn’t a way to do any escaping anywhere :man_shrugging:

In this particular instance (this is actually a little different than the first post, but it’s the same project, and method I was trying to above), I am trying to enrich to get a record ID so I can update (patch) it on airtable…My original source is actually shopify, so I don’t know what the record ID on airtable is unless I enrich, to enrich in airtable, you have to use a formula, and columns with spaces in them need to be in curley brackets. I confirmed this by testing using Postman, and learned it has to arrive {like this} (double quotes, apostrophe, or double brackets don’t seem to work to escape anything, anywhere in the URL.

This is what worked on postman:

https://api.airtable.com/v0/appTaCoTuEsDaY/ShopifyChild?filterByFormula={Variants: Id}=“39920792600691”&fields=Variants: Id

fields is to simply the payload, I don’t really need anything because it will come back with the record Id.

The problem is airtable wants to see {Variants: Id}, but Parabola sees it as a variable and will say the column doesn’t exist, which is true… It would be nice to see all the little tips and tricks (like this one)on escaping somewhere (originally, but I have little hope that escaping is really possible.

However, there is a workaround I discovered all by mi lonesome sevy…

but if there is an easier way I would love to know… I had to add two transformations… Insert Text Column & Find and Replace…

  1. Create a column, give it whatever name you want, mine was “no escape”, you’ll refer to it in step 3. all of the values will be the same… I can’t use {anything in brackets} yet because Parabola says it doesn’t exist and it won’t add any columns… so give the value of this column whatever text because you’ll find and replace that text with the {Variants: Id} in step two, I used “blah” in my case.

  2. Now replace “blah” or whatever with {your formula column}.

  3. Now in your url you will reference your column (mine was no escape, and your replaced value will arrive to airtable (or wherever you need it to send off to) in curley brackets…

My parabola Get request to airtable looked something like this…

https://api.airtable.com/v0/appTaCoTuEsDaY/ShopifyChild?filterByFormula={no escape}="{ViD}"&fields[’]=Variants: Id

(I had to add the apostrophe to [’] otherwise you get a box on the community form, not sure how to escape that at the moment)

This is what it took me to go get the record ID so I could make a patch request to update changes made in shopify in my airtable base.

Anyone reading this has tips to share, please share, It took an hour of trial and error, and giving up on trying to escape characters for me to think of the work around, but there was a way!

Hey @Dan_Valentine,

Thanks for your post. I’m glad you were able to find a workaround and solution to ultimately enrich your Shopify data with an API request through Airtable!

Depending on your data, you may be able to avoid this by using the “Pull from Airtable” step and merging that with your Shopify data on a shared Variant Id.

You would need to import your entire table from Airtable, but it might be faster than enriching your Shopify data in each row.

If anybody else would like to share how they’ve escaped characters, feel free to post them here. :slight_smile: