I’m currently working on a Maestro process where I need to read an incoming email and download all of its attachments and then read them with ixp.
To test this, I created a simple flow with a download step followed by a Send Email task. For downloading, I am using the Gmail connector activity Download Email Attachment By File Name.
Even though I am leaving the Filter by filename field completely empty, this activity only seems to grab and download one attachment. Then, when I map that output to the Send Email task, it only forwards that single file instead of all the attachments present in the email.
What is the best approach or best practice in Maestro to handle multiple email attachments when using the Gmail connector?
Any guidance or examples would be highly appreciated. Thanks in advance!
Also, as per docs, the activity’s output is “Attachments”, which is a collection, not a single file. In your screenshot, the output is labeled singular (Attachment), which is worth double-checking in the Variables/Data panel and confirm its actual type. If it is a single IResource instead of List, that means the filter issue is truncating the result set before it even reaches your Send Email step.
Also, in your Send Email task, can you try to put Attachments variable instead of a Single Attachment. Check the properties here: Activities - Send Email
Please try using a wildcard (*) in the Filter by filename field instead of leaving it empty.
Also, make sure you are mapping the Attachments collection to the Send Email task, rather than a single Attachment. This should allow all the email attachments to be passed through.
Hi @iboti57 ,
The Download Email Attachment By File Name activity is designed to return only one attachment, even when the filename filter is left blank. That’s why only a single file is being passed to the Send Email task.
Best practice in Maestro:
Use Get Email or List Email Attachments to retrieve all attachments.
Loop through the attachments using a For Each step.
Download each attachment and store them in a collection/list.
Pass the complete attachment list to IXP or Send Email.
The Download Email Attachment By File Name activity appears to return a single attachment, even when the filename filter is empty. Therefore, mapping its output directly to the Send Email task will forward only that one file.
For handling multiple attachments, you can try retrieving the email’s attachment collection first and then loop through each attachment to download or process them individually. In Maestro, you can use a loop/iteration over the attachments and store the downloaded files in a collection. Then pass that collection to the next activity or to IXP for processing.
Also, please check whether there is a Gmail connector activity that supports downloading all attachments directly. If not, processing the attachments one by one would be the recommended approach.
I actually tried using wildcards in the filter, but it still downloaded only one attachment. It seems like the “Download Email Attachment By File Name” activity in Maestro is designed to return just a single file reference, rather than a collection/list, even when using wildcards.
I managed to solve the issue by using a For Each loop (multi-instance marker) to iterate through and download all the attachments one by one.