How to re-run the workflow in case of an error?

Describe the problem/error/question

My workflow is triggered when file appears in a Google Drive folder. However it fails sometimes due to 3rd party service llamaparse, which is out of service sometimes. What I would like to do is to re-run the workflow when this happens after some significant delay like 30 minutes. However the workflow is never triggered again for the file, which was already uploaded.

What would you suggest?

What is the error message (if any)?

No error message.

Please share your workflow

Information on your n8n setup

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

Hi @napped, welcome to the community :tada:

I noticed you have a Wait node for ā€œPENDING.ā€ Have you tried adding another Wait node for ā€œERRORā€ to wait for 30 minutes?

Also, I think you’ll need to update the HTTP node settings under ā€œOn Errorā€ to ensure that the workflow does not stop when an error occurs.

Hi Mohamed, thanks for a quick reply! That’s an interesting idea and I’ve implemented that for the PDF upload node I had problem with today.

However I would still prefer some more foolproof solution. What I mean is that there are a lot of other nodes, which can fail (the workflow I posted is just a subset of the full one) and I don’t want to implement a wait cycle to each. I would prefer the whole workflow to fail and be re-run later.

Something like: Check Google Folder every X minutes and if there are files, process them. Currently it only processes them once because it picks the new files from the last check.

Also isn’t there some workflow runtime limit I would hit with wait nodes waiting for 30 minutes?

Yes correct


Maybe you could redesign the workflow so that in case of failure, the file is moved to a ā€˜failure folder.’ Then, set up another workflow that triggers every 30 minutes to move the file from the ā€˜failure folder’ back to the main workflow folder, thereby restarting the process…

1 Like

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