For a client I'm looking at the following case:

They have all sorts of documents within a document library grouped into folders (multiple levels deep). If a folder doesn't contain a document, the process owner knows that something is wrong since it's not complete. They want to be able to manually start a workflow to check a particular folder for completeness. If it's empty an email must be send with the name of the folder.

I was thinking of using SharePoint Online 2013 workflow however there is no action available to check if a folder is empty or not. So my second thought was using a webservice to do it for me, but I need some guidance on how to do that.

  • Can this be done by leveraging the default web services from SP2013 Online?
  • How can I check if a folder is empty?

I am not a programmer, but I know how to write some code. Any suggestions are welcome.

Thanks, Kevin

2 Answers 2


Yes use SharePoint Rest Services and then calling:


Just loop through all the results and when ItemCount = 0 and Name of the folder is not equal to Forms(default in every library) send out an email.

It does not list out the subfolders. Still thinking about a proper solution for getting all of the sub folders.

Refrences how to apply in workflows:



It could be done by leveraging SharePoint REST services.

In SharePoint 2013 workflows was introduced a new action named Call HTTP Web Service. This action is flexible enough to make requests to a variety web services including SharePoint REST service.

The following REST request demonstrates how to determine whether Folder contains items:


Note: the query returns the count of items (File or Folder type) stored in the specified folder.


  • 1
    Thanks for your answer. Looks good. I will try that approach!
    – KevinvG
    Oct 13, 2014 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.