Skip to main content
Nintex Community Menu Bar
Solved

SharePoint Online - Create a folder / Already Exists

  • February 5, 2025
  • 4 replies
  • 128 views

poirisop
Forum|alt.badge.img+4

I am using the action 'SharePoint Online - Create a folder' to create a folder by year and another by month. Since the workflow is called multiple times in the same month, it fails because the folder already exists. Is there a way to check if the folder exists before calling this action? Or is there a parameter to prevent it from failing if the folder already exists?

Thanks!

Error message:

Received an error response from the connector: {"message":"A file or folder with the name https://xxx.sharepoint.com/sites/GPCNintexWorkflowCloud/UAP/2025 already exists.","correlationId":"adc47f22-c138-4359-b496-6b59d773eb39","code":null}

 

Best answer by SimonMuntz

Hi ​@poirisop,

Welcome to the community.

The note in the help files is odd. The action is used to create a folder, so, of course, the folder does not yet exist. Unfortunately, there is not a “do not overwrite” checkbox or anything like that for this action. Please feel free to suggest it here.

In the meantime, I suggest using a query list action that looks for the folder name.
Then add your create folder action in a run if action.  Configure the run if to run if the “Number of items returned” from the query list action equals zero.


 

4 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • Answer
  • February 5, 2025

Hi ​@poirisop,

Welcome to the community.

The note in the help files is odd. The action is used to create a folder, so, of course, the folder does not yet exist. Unfortunately, there is not a “do not overwrite” checkbox or anything like that for this action. Please feel free to suggest it here.

In the meantime, I suggest using a query list action that looks for the folder name.
Then add your create folder action in a run if action.  Configure the run if to run if the “Number of items returned” from the query list action equals zero.


 


MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • February 10, 2025

Hi ​@poirisop 
Did Simon’s reply answer your question? 


poirisop
Forum|alt.badge.img+4
  • Author
  • Rookie
  • February 10, 2025

@MillaZ : Yes, ​@SimonMuntz answered my question.

I have created and idea: CNV-I-393

SharePoint Online - Create a folder - Add check if it | Nintex Ideas

Thanks


MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • February 10, 2025

Thank you ​@poirisop