Help

API - Simple Find & Update - Please Help

Topic Labels: API
1352 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Swarm_Reviews
4 - Data Explorer
4 - Data Explorer

I’m trying to setup a simple API but I’m not exactly sure what APIs to use.

  1. I want to check for a unique value in a field (userID) and return the RecordID.

  2. If recordID exists, overwrite record with new data

  3. If recordID doesn’t exist, create new record with data

At the moment I’m stuck on 1. I’ve tried List Records, using filterbyFormula & the API Encoder tool, Retrieve a record, I just can’t get the single results returns like I’m after.

Can someone please provide me with an example API request to for number 1? If you could help with the others that would also be really great but at the moment 1 is where I’m stuck.

I know it’s a really simple API setup but I’m new to this and have been trying for hours. I have also posted to the Airtable forum but my posts aren’t getting approved for some reason.

Thanks so much.

3 Replies 3

What’s wrong with the results you’re getting?

Here’s one I just tried that works for me:
https://api.airtable.com/v0/[APP ID]/[TABLE ID]?filterByFormula=AND(Name%3D%22Bob%22%2C+Notes%3D%222%22)

The formula is: AND(Name="Bob", Notes="2")

Have you verified that the exact formula you are using also works in a formula field?

Trying for hours when working with your first API sounds normal. APIs can be finicky and you have to get everything exactly right.

@Swarm_Reviews 

If you’re having difficulty coding, you can very easily do what you want in a no-code/low-code manner with Make’s Airtable automations & integrations.

In particular, you can easily use Make’s “search and upsert” functionality to do this. Check out the screenshot below.

There can be a bit of a learning curve with Make, which is why I created this basic navigation video for Make, along with the links to a few other Make training resources. 

IMG_0209.jpeg