Sending an email with multiple files

:bullseye: What is your goal?

I want to send multiple files in one email message,
The files come in 2 forms:
Files that I receive from a dynamic folder in Google Drive and are collected in an array aggregator
Another static file that I take from another folder in Google Drive

:thinking: What is the problem & what have you tried?

I can’t seem to combine them into one array that the REPLY TO AN EMAIL module knows how to take them all and send them,
I tried different formulas and nothing produced the desired result
I attached the output from the 2 modules and the formula I tried

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

1 Like

There are two valid solutions here.

• Option 1 - Add attachments directly in the Gmail module

In Gmail “Reply to an email”, you can manually add multiple attachments.

You simply:

  • Download each file

  • Add two attachment rows in the Gmail module

  • Map each file individually (Name + Data)

This works well if the number of attachments is small and fixed.

• Option 2 - Use an Array Aggregator (recommended for dynamic files)

If the number of files is dynamic, use an Array Aggregator before the Gmail module.

Steps:

  1. Download all files

  2. Add an Array Aggregator

  3. Set Target structure to Gmail → Reply to an email

  4. In the aggregator, map:

    • name

    • data

  5. In the Gmail module, map the Attachments field with the array output from the Array Aggregator

2 Likes

Hey there,

as long as the two arrays have the same structure and that is the structure that the mail module expects, you can use merge() to combine them.

Now in one of your screenshots you are trying to use add(), this will add individual item to the array, but you need to add the file with the name and follow the same existing structure, not add the file ID. Also the comma you have is the text string comma and not the function one, you need to replace it with this {{,}}.