Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

Attaching multiple documents


Level 7
I have a workflow to attach a single document using the list variable. However, I would like to attach multiple documents.

In the current workflow I use the "readResourceContent" module to read the PDF stored in the recources repository.

Do I have to add another module if I would like to read more than one file ?

5 Replies


Level 10

With the current version, you can only read one documnet at a time.

You can write a custom component that uses the Reposiroty API or use a loop and call the readRessource multiple times.



Level 7
Thanks for replying.

What variable can hold multiple files ? This would apply if I wanted to send multiple attachments,read from a file system (not repository).



Level 4

A List variable of subtype "Document" should be sufficient for holding multiple files. Remember that List variables are 1-based meaning that the first item in the list will be at index 1 and not 0.

Let me know if you have any issues.

Josh Boyle

Cardinal Solutions Group


Level 7
Josh - Thank you for replying.

How would I assign the files to the list variable ? The last time I used a list variable was to attach one file.

Does this mean I will need to have one document variable for each file ? and then assign the variable to list[x] ?



Level 9
You can use one of our custom components to do this:

Then click on Collection Utils, and scroll down to:

Multiple Files Reader to List

Download here: