I want to send email no matter the amount of attached images

I’m currently receiving JSON data through a webhook, containing some text, and 0 / 5 images.

I want to send an email to myself containing all this information, doesn´t matter if it´s 1 or 5 images.

Currently when adding the 5 images as options / variables, it gives me an error when I receive an email with only 1 image attached, because it can’t find the other 4 images.

I’ve tried creating 5 filters, 1 filter per amount of images attached, but it doesn’t work.

What would be my solution? to send the email with all the images no matter the amount of images there are in my webhook.

Ps ( different question, am I able to add images to my google sheets?)


Welcome to the Make community!

You only need one email module and no router.

Iterate the array of images and then aggregate them to an array. Arrays can have variable lengths of values.

Then to map them in the attachments field,

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.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!