Merging data

Hi n8n community!

I have trouble merging some data following this scheme:

  • Set #1 has some fields: A, B (email), C, D
  • Set #2 has some fields with one that is common with #1 and can be used as a reconciliation key: B (email), E, F
  • The expected result is a unique set with all fields: A, B, C, D, E, F where E and F are empty if the email from #1 can’t be found in #2 and where A, C, D are empty if the email from #2 can’t be found in #1

I’ve used the “merge” node but haven’t managed to reach the expected result.

I was wondering whether that could come from the way my flow is built, where I have some input data, use it to extract some more data for some entries, and then try to merge both (because I want to keep the entries .
Capture d’écran 2022-06-29 à 12.13.01

Any thoughts on how to proceed? That’d help a lot! :slight_smile:

Maybe this could work? Using another set node (in lieu of a merge node) and using data coming from the first set node and input data from Gsheet?
Capture d’écran 2022-06-29 à 12.38.34

Hey @RomHav,

Is this data coming from 2 different Google Sheets or is it in the same sheet and layed out like your image? If you can share your workflow we can take a quick look and see what needs to be changed.

The data is coming from 2 different sheets, the picture was just intended to show how the merge is supposed to happen bw the 2 sources.

Here’s the workflow: n8n.cloud

Hey @RomHav,

That looks like a link to a cloud environment, We don’t have direct access to those instances. You can export the workflow and upload it here that should let us see it.

Here it is :slight_smile:

Well there is more to that than expected, I thought you might have had a smaller workflow you were starting with to check the concept.

I will go with plan B and create 2 test sheets and put an example together.

Sure, please let me know!