Reference data from another "row" best practice?

Hi,
To give live example.

I pull from Google employee data, that includes their manager and slack ID.
For further processing I need to add to the user record a slack ID of their manager.

If I would be using a Google Sheet as a source of my data I would run a vlookup on manager email and based on email find slack ID of the manager and include this in employee record.

What I can do here is use code node to inject all records and then run some basic python search on the JSON while updating it. Then when done I turn it all into “rows” again for further processing.

Short term I will actually probably make code ask slack what the userID of every manager’s email and return it as part of the record. But that’s a horrible way to handle this.

Are there any recommended solutions / build in nodes?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

bad bot, not relevant

@Mateusz_Bijakowski , here’s what I came up with avoiding coding (no-code solution).

That looks both impressive and horrifying :slight_smile:

To be clear, I don’t mind code, but implementing quality search engine is hard and usually not very efficient if done wrong.
So I’m kinda assuming it’s beneficial for n8n to provide a tool that handles that.

In the meantime, I will look at your work, I haven’t had much success with merge and this looks interesting.