Continue only if file doesn't exist in Nextcloud

Hi everyone!

Describe the problem/error/question

I am trying to do automation to download the attachments of a file and upload it to Nextcloud. That was simple for me, but the problem now is how only to continue if the file doesn’t already exist on Nextcloud?

I tried the IF block but it will give an empty “True” when the file is not found which will stop my automation.

Please share your workflow

Information on your n8n setup

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

Hi @Auto.Matron :wave: Give this workflow idea a try - one branch will pull a new file to test this with, and then set the data to a normalised variable name to compare it, and the other branch normalises the Nextcloud filenames without the path so they can be compared. We then check to see if the files already exist, and if not, it uploads :tada: If the file already exists, it does nothing.

Let me know if that helps!


Thank you! I did some changes but it’s working great!


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