Here’s what I’m trying to do: within a Loop for each action, generate a PDF document - then attach each PDF from the loop to a single email.
I’m creating a workflow for an employee incident report (for example, when an employee slips and falls at work). There are three elements to it: the employee’s own report, their supervisor’s report, and one or more witness reports (depending on how many witnesses there were).
The employee and supervisor reports are no problem since there is only one of each. For the witness report(s), I’m using the Loop for each action for each witness named. Within the loop, a component workflow is called to get the data from each witness (the parent and child workflows run concurrently). The component workflow data is passed back to the parent, and I use that to create a PDF document for each witness. (I’m not creating the PDF in the child workflow because I don’t believe a PDF can be passed back to a parent.)
Once all the reports are generated in PDF, I want to send all of them to our HR department in a single email. I just don’t know how to collect the witness PDFs so that they can all be attached in the email. Ideally, each PDF would be a separate attachment, but it would be okay if they were combined. (I don’t know if that’s even possible.)
I wondered if there was a Collection action that could be involved somehow, like doing an Add item to collection action after each witness PDF is generated, but PDFs are already Collections and I don’t believe you can create a “collection of collections,” as it were.
Any suggestions?