Best answer

How to Format Query String Params - Webhooks GET Request

  • 25 May 2022
  • 7 replies
  • 2546 views

Userlevel 1

I am trying to pull a list of records from Airtable using dynamic parameters. One field is a date field, and using Airtable’s internal Find Records action does not allow for dynamic dates.


I have been able to pull Airtable records via Zapier with the GET request, but only for a specific view. Due to the nature of what I want to do (pull a list of records within a given date range, that is based on the date of a NEW record and not related to today’s date), a view will not work.

I have experimented and done lots of googling but haven’t found info on how to format the Query String Params so it pulls records based on this dynamic criteria.

Any help is appreciated, including other methodologies which may be better suited to this task.

icon

Best answer by Troy Tessalone 25 May 2022, 03:28

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +14

Hi @mariecurious 

Good question.

Try using these functions in the filterByFormula parameter.

Concept would be where both conditions are true (return 1) within an AND() function.

Airtable related topic: https://community.airtable.com/t/filterbyformula-to-pull-specific-but-changing-date-range/32470/2

 

 

Userlevel 1

Thank you so much for the response!! I started with a simple search to just match a single field, but it is still pulling more records than apply. I assume I am entering it into the fields wrong. Forgive me, I am not a coder at all, are you able to provide guidance on the syntax? Including one version I have tried below, my variations have done nothing to limit the results. I am getting results from the correct base so I am working under the assumption it is just the filters I am messing up.

 

 

Userlevel 7
Badge +14

@mariecurious 

Try putting quotes around the mapped variable.

{MonWeek}=”[MonWeek]”

Userlevel 1

Thanks, it did not work but I will continue to try variations and throw this in the mix! Support was unable to assist so I may try some other forums. If I figure it out, I will post! It seems like any solution I find may be limited to Airtable though (but hey maybe it helps someone lol!).

Userlevel 7
Badge +14

@mariecurious 

I was able to test successfully.

I mocked up an Airtable Base with records that had different dates.

3 matched this criteria and 3 results were returned from the GET Airtable API request.

 

Userlevel 1

OMG So I just needed to capitalize the B in filterByFormula and it is now working!!

This is definitely a game changer for some incredibly helpful things that we can’t really do manually without making errors.

YAY for screenshots and helpful people.

 

Thanks immensely.

Userlevel 7
Badge +12

It’s always the little things isn’t it @mariecurious! Great work in finding that pesky b and thanks Troy for helping out 😁