I want to send an email to a customer, if a woocommerce product has downloadable files defined. My problem is, there are products with one file and others with more than 1.
I did not manage to iterate over these files and attach them to a mail.
Any ideas to this? Thank you!
blueprint.json (14.0 KB)
Your Aggregator’s Source Module should probably be set to the iterator module.
Did you map the whole array in the attachments field?
Every result (item/record) from an iterator module will output a bundle. To “combine” them into a single structure, 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 Array Aggregator module also allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.
Here is an example of using the “Target structure type” of an Array Aggregator module:
As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.
samliew – request private consultation
Join the unofficial Make Discord server to chat with us!