Hi,
I have an automation setup where i am downloading a variable number of files from google drive and i want to attach them all into one gmail email and send to an email address. Currently when i put the gmail app and select the google drive mapping for file it sends multiple emails but does not aggregate the file attachments and send in one email. Please help.
Welcome to the Make community!
Combining Bundles Using Aggregators
Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.
You can find out more about the other types of aggregator modules here:
- Array aggregator
- Text aggregator
- Numeric aggregator
- Table aggregator
- JSON aggregator
- CSV aggregator
- Archive (ZIP) aggregator
- other app-specific aggregators
Mapping a Specific Structure Into a Complex Field
The Array Aggregator module is very powerful because it allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.
This is done using the “Target structure type” field in an Array Aggregator module.
Here is an example:
As you can see, the “Map” toggle on complex fields are used when you have an array. You can easily build an array variable to map to a future module’s field, by using an Array Aggregator module and select the “Target Structure Type” as the future module’s field you have mapped the array into.
Example
Here is an example of how your scenario could look:
This is just an example. Your final solution may or may not look like this depending on your requirements.
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.
Thanks a lot @samliew very helpful!
No problem, really glad I could help! Thank you for providing all the requested information — that allowed me to come to a solution quickly.
1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
- others can save time when catching up with the latest activity here, and
- allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.