Is there a way to run a workflow on a Document set and have all the documents in that document sent as individual attachments in an email?
I thought I would add my solution to this problem, even though it is an older question as I have been trying to get this to work and I think the solution might be useful to others.
I simply added the URLs to a collection variable and referred to the collection variable in the Send Notification action. In that way you can send a variable number of attachments in one email easily.
Does it need to be in the same email?
Great info on Starting a workflow on Doc Sets Using Document Sets - Nintex Workflow
How to get all documents in a document set Nintex Workflow - Querying a Document Set - Vadim Tabakman
This example will just return all of the IDs of the items, but you can use this example to get the full URLs of all the documents.
The tricky part would be adding all of the documents as attachments. You can have a reference as the attachment url in the Send Notification action. But only one reference or variable per attachment. As in, you cannot add 3 URLs into one configuration of attachments. I can see a way of run if #files is 3 then have a Send Notification action configured with a loop through the collection but only looking for 3 items, if 2, then a new run if that has a Send Notification configured with a loop around it looking for two items, and so on. But that is a limitation as you cannot know how many possible items you could have. And you wouldn't want to create 100 run if action sets.
Retrieving data ...