Merge node "keep key matches" both inputs are the same?

Describe the issue/error/question

So, my evil automatization plan is to get only tasks with names from the spreadsheet list. Basically,
list = tasks.Where(t => spreadsheetList.Any(

I get list of tasks from Clickup, i get list of names from the spreadsheet and i want to merge them with “keep key matches” - sounds just perfect.
The problem is that Match node with “keep key matches” mode, for some reason works only with Input 1.
Input 1 is the list of tasks, so i can extract them with {{$json[“name”]}}.
Input 2 is the list from the spreadsheet, but while editing the expression, i still see the input from the input 1.

Apparently, “keep key matches” is not working with different inputs? It it just merges the keys themselves, not objects? But still, why Input2 has the same structure as Input1?

And the second question, how can i create such fitering logic with code? Function node supports only single input?

Please share the workflow

Hey @yavetal, I hope you’re well?

I love evil automation plans! The merge node wouldn’t need an expression in this context but simply the names of the field you want to compare. So if your Clickup node returns a field called name and your Google Sheets node returns a field called Name, your comparison would simply look like so:


Here’s an example workflow showing the idea:

Hope this helps!

Riight, its a static (unchangeable) field, so no need for expression.
Thanks, now i can keep conquering the world with n8n! :slight_smile:

1 Like

@MutedJam Actually, the story is not over :slight_smile:
I’ve got the case where i need “contains”, not “equal” comparison. So, the Merge is not fitting, and i cant write my own Merge, because Function has only 1 input.

The only idea i have in my mind is to put them one after another, make a Function that reads from both nodes. I dont like it, because i need to hardcode the name of the nodes - i’d like to keep that visual (its a reusable approach either).

@MutedJam Sup, any suggestions? :slight_smile:
I’ll shift towards the Function that would get the spreadsheet data by the node name, but i really dont like unobvious conections

Okay, now i’m officially lost.
It is looking like the node (Clickup-get list in my case) is running itself for each input element?
I have 10 items in the spreadsheet and 15 items in the clickup list, why do i have 150 items as an output? Due to my time feelings, Clickup node was indeed called 10 times.

How can i either avoid Clickup to be called 10 times in the current flow, or how can i customize the input from 2 nodes (Merge node with “contains with” key logic) in the flow above?

Also, the Json view shows only 10 records. While the Table view shows 150. What is going on?

Okay, so i went back to parallel execution, now i just need to make Function that works with both inputs

I’m not sure though, if the Function sees both inputs like input1 and input2 or just 2 separate runs