Wait for all Switch-items to finish

Describe the problem/error/question

Hi there,

I’m fairly new and am playing around with workflows to automate the sorting of pdf files from my banks to specific folders, based on the type of the pdf (like account information, general information etc.).

So I’m pretty far and created a workflow that waits for a file to appear (zip), then unpacks it, looks at the filename and then writes it to specific folders.
The zip file obviously may contain multiple pdfs and the switch runs for all of them.

Now, I would like to remove the original zip file after everything is done. A command would work, but I would like to wait until everything is done and just then remove the file…

So my quesion is: How do I wait until all files are processed and then continue with just one stream?

Thanks,
Viktor

Please share your workflow

Information on your n8n setup

  • n8n version: 1.72.1
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Unknown
  • Running n8n via (Docker on Synology):
  • Operating system: Synology DSM

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:

Welcome to the community @viktorsc !

I think you could engage Loop node to ensure all the files have been stored to the disk before continuing with the workflow.

1 Like

Hi,

Thank you.
That helped!! Amazing - thanks a lot!

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