Issue with looping and 3 airtables

Hi all,

I am working on my first n8n automation with loops and numerous data sources.

I need to retrieve information from three different tables (Properties, Users, and Management Company). The automation should create an invoice for each property (30 in Airtable) and send it as a PDF attachment.

The PDF part is taken care of since I am familiar with APITemplate.

To test the automation, I am currently populating an HTML file.

The template should include specific user information such as name, email, and some general information from the ‘Management Company’ table, i.e., company name, company email, etc. I obtain the individual items from the ‘loop over’ node and the general information from the ‘merge’ node.

In the three-table automation, I have all the information, but it doesn’t loop, and I only get one output.

In the two-table automation, excluding the Management Company (the one I started with), I receive information from both tables, and it loops.

I have been struggling with this (most likely) very simple issue for a few hours, and it confuses me more and more.

Can anyone help me with this, please?

Here is the blueprint - I hope the above and the blueprint make sense.

Thank you very much in advance.

Warm regards,

Jan

Your top merge node is only outputting a single item. This is because it’s set to merge by position, and the third input only has one item. So it throws the other items away.

You can fix this by changing the type of merge in that top merge node. Is there an ID in each of the three input branches that you could use to do the match?

(If changing the merge node to combine by matching fields, you may need to use two merge nodes since they only accept two inputs at a time)

Good morning sirdavidoff,

Thank you very much for your reply.
I managed to get it to work after a good night’s sleep.

I placed the ‘Company Management’ table inside the loop - sometimes the most straightforward solutions are the best!

Have a great day,

Jan