You can't run a workflow on a folder. You can run it on the list, or the site. I'd recommend doing a site workflow. It's a 2 step process.
- Find all the documents that match your criteria
- Determine if the documents are in the specific folder.
For part 1, use the Query List action to query the library this folder is in. Make sure to check the box for "Recursive". This makes it search within folder. Set your criteria to look for any documents where the Name contains 2. (or does not contain 2. I didn't exactly understand your conditions if you want to send out the notification if has 2 or doesn't have 2). I would return the ID field and create a collection variable to store it.
For part 2, once you have the collection of ID's, you now need to determine if the document is in the specific folder. Use a For Each to loop through the collection. For each ID, query the list again for that document, and pull back the URL Path of the document. You can use a Regular Expression action to remove the file name to get just the path. Then evaluate that url to see if it matches the path of your folder. If it does, then you can send out your email.
Thank you for the quick reply, I am building the workflow now.
Thanks again!
Jennifer
Jennifer if you succeed with suggestion from Brendan please do not forget to mark his answer as "Correct"
Regards,
Tomasz