SOLVED - Problem with loop

Hello everyone,

I have a workflow that retrieves data from an API and then generates a document in Google Docs. During the document generation, a loop is necessary. After the generation, the document is converted into a PDF and sent as a file.

The issue I’m encountering is that if my loop has 5 items, it will send the file 5 times. The number of files sent always matches my number of items.

I’m sure the problem isn’t very big, but I can’t find a solution.

Thank you in advance for your help.

Information on your n8n setup

  • **n8n version: 1.24.1
  • **Database (default: SQLite): SQLITE
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • **Operating system: Ubuntu

Hi Lyoto,

Loop block is hard to make it work. :slight_smile:

I use Set block to format my data into a JSON with list and then I use Split Out to extract the list and avoid any loops.

Hope this helps

I found a solution, I checked the box below in all the elements after the loop.

2024-11-06 at 11.38.15

2 Likes

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