Looking up key in table/flat JSON and adding values to other JSON

Describe the problem/error/question

Hi, new to n8n and have what’s likely to be a beginner question.

I am trying to combine the data from a given row in a csv into the JSON schema of another node’s ouput.

The inputs are an email structured as below:

and a flat csv as below:

I would like to match the name in the “To” field of the email as the “user” key in the csv file and add the other fields such as “email” and the third redacted column to the overall JSON schema.

The above functions each produce the same output of the user.

Please share your workflow

Information on your n8n setup

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

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:

@gustyconclusion , “Fields to match” in Merge node are expected to be names of the fields but you are matching by the values instead.

1 Like

Thank you, @ihortom, that sent my down the right path. As the incoming email was an entire address ([email protected]) and the incoming table key just the user I had to add in a step to split the sender as below, but we got there. Many thanks.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.