Automation to add new records is creating duplicates?

Definition of Count:

Defintion of Branch:

OK - The above is an attempt to create a new customer record in Baserow. Runs daily, GETS customer list from manager.io, then loops for each customer found in manager, counts matching records (same key) in Baserow, then if count result is zero branches to get detail of single manager record for current iteration and to create record in manager, if count not zero defaults to empty branch.

The below records were created in Baserow when starting with an EMPTY baserow table despite the fact that there are no duplicates in the loop list.

…

I do not understand why this seems to work and correctly cycle though some customers and create new records but then creates multiple duplicates for others. It feels as though something the count or something isn’t incrementing yet? I don’t get it.

Any ideas or suggestions how to make this type of nightly customer addition automation work without creating duplicates?

Thanks.

Hi @valsoar1 Your “Count Matching Baserow Records” is a Summarize field node that is summarizing (counting) the records that match each loop item. I think this isn’t what you want to do.

If I understand your workflow design correctly, you want to:

  • Loop over all records from a “source table”
  • Check if that record exists in your “results table”
  • If the record doesn’t exist, create a new record in the “results table”

To do that, you should replace your “Count Matching Baserow Records” with a List multiple rows node, and filter for a matching field. You can check if the filter matched by using the length() formula.

You can look at the attached screen recording for how to do this. In my example, my “source table” (Manager Customers) has some existing names. My “results table” (New customers) has 4 rows, two of which are duplicate, and two which are new:

  • Ada (duplicate)
  • Tsering (new)
  • Alan (duplicate)
  • Paljor (new)

In my example, “Ada” and “Alan” are ignored since they already exist in my “source table”, while “Tsering” and “Paljor” are new and therefore appended to my “results table”.

Thank you. That was helpful.

1 Like