Airtable API Export Help - Update or Post New

Here is a scenario I’m trying to achieve using Parabola:

  • Import data from my Airtable base and import data from a CSV
  • Join the 2 tables together based on a unique ID
  • If there was a match, I want the new data from my CSV to update fields for that record in Airtable
  • If there are unique ID’s in my CSV that aren’t in Airtable, I want to create a new record in Airtable for each of these rows.

I know I need to bring in both data sources and join the tables based on the unique ID. I also know that I need to do a Patch API Export to Airtable to update the records and a Post API Export to Airtable for the unique ID’s not already in my Airtable.

However, I’m not sure how to accomplish this. I’m not even sure if I can do 2 API exports in the same flow. Any insight would be greatly appreciated!

Hi @Josh_Cykiert! Good question, two separate API Export steps in the same flow will be totally fine. As you already described, one API Export will be set to Patch and another API Export will be set to POST, but since there will never be any overlap between the data exported, it shouldn’t cause any conflicts.

Thanks @sachi. I guess I’m just not understanding how to split the data to allow me to have 2 different API exports in my flow. What steps do I need to add?

In your Join step, it sounds like your CSV should be the primary table when you join. There, you can see which rows have a match (to update in Airtable) and which rows don’t (to create in Airtable).

After the join, use two Row Filter steps to create the two different branches of your flow. I would imagine the record ID column from Airtable being a good column to use for the Row Filter. If the record ID column is blank, then you know you need to create it via a POST call with the API Export step. If the record ID column is not blank, then you know you need to update it via a PATCH call.

Does that sound like it’ll work?

I understand. Thanks!

1 Like