Check if record exists (if condition)?

I want to achieve what should be simple but my tired brain is struggling.

I have 2 data sources (A and B) each containing a list of records. I want to check if a record is present from data source A is present in data source B? If it is not present then create it in data source B.

I am struggling because the IF node looks to compare 2 values. In this case I am looking for the absence of all values for a record and wanting to trigger an action based on that absence.

How?

I have tried with the merge node, where I think the solution lies, with no joy.

The records contain name email and a unique registration number. I don’t think the values are relevant here as its the absence of the record entirely that I am looking to use as trigger or condition. The values will ultimately be used to create the record in datasource B.

Hey @Robm, assuming the unique registration number is present in both data sources, you could use the Merge node’s Remove Key Matches mode like so to list all items present in data source A, but not (yet) in data source B:

Example Workflow

You would then add the items to data source B if this wouldn’t just be an example.

A similar scenario (though slightly more complex as it syncs in two ways) would be described in more detail in this recent blog post:

Hope this helps! Let me know if you run into any trouble here

1 Like

Success. I was using the merge node on the right setting but I was using the expression rather than the field name. A mistake I keep making.

1 Like

Glad to hear this worked, thanks so much for confirming!