With Gmail following HTTP Get a file, you have the change to map a File to the HTTP module, or select the Map option which allows you to select the Data and Filename separately (in case you wanted to alter the file name instead of using whatever the original file name is).
If you need to attach multiples, then you would need to set an Array Aggregator before the Gmail module. The Array Aggregator aggregates the results of the HTTP Get a File, then you select “Create a Draft: Attachments” as the Target Structure Type from the Gmail module (GMail module must be connected after the Array Aggregator for this option to show up).
Hope that helps!
Edit: HTTP Get a File might not work for you if you’re downloading PDFs from a protected source. In that case you’d need to use another module to get the PDF in data/buffer form.
First of all, really appreciate the detailed response! Definitely helped a lot.
I took what you wrote and changed it a little so that I am downloading files from a google drive as opposed to using the HTTP module. I also attached an array aggregator but for some reason, only 1 PDF attachment is being sent. Do you see anything obviously wrong with my flow?
I want to say that it’s because my gdrive file ID is choosing only 1 file but I can’t seem to keep it open. Below is a ss of my aggregator in case that is the issue. Thanks!!
My guess is that “ Download a File” is only getting a single file.
Aggregator is still working but only has one file to work with.
Assuming you need multiple PDFs from a Google drive folder, Try using a Google Drive Search for Files on a folder, that should output multiple bundles. Follow that with a Download a File module, which should download each. Follow that with an Array Aggregator and set the source as the Search for Files module.
I guess the final step is how do I get the loop to run again so that I can have multiple downloads so that I can aggregate them into an array? Really appreciate your prompt responses!
It depends, what is the source of the files? How do you know where each file is? I assumed they would both be in a single Google Drive folder, which you would be able to search. If that’s not the case, you have to take a different approach.