Add dynamically attachment to send mail


I need to select some files and add them automatically as attachment to the email sent from the website.

I make a db table where temporary are stored the location of the files like


then I set up a mail action.

When going to add the attachments I got only the following:

Moreover, I suppose the location of the files must added as array if I am not wrong.

Any idea or procedure?

Thank you


Use single query or {{query1[0].fieldname}}

thank you… and what if I have to attach multiple files?

Is it seperated table for your attachments ?
You can use split and join formatters

When I select the file, I add the location to a separated table like below:

Schermata 2020-01-15 alle 13.00.24

Sincerely speaking I m not so skilled to follow your suggestion, can you please make me an example ?

{{query1[0].fieldname}} for a single file works very well.
But if you could make me an example for multiple files would be great …
thank you

You need to place the query inside a repeat to expose its contents in the picker




The you will see the query contents


Dear Friends,

thank you for your help.

At the end I discovered that there is no need to have any special form. Just having the query selection only the files location and in the Send Mail action select {{query1}}

Schermata 2020-01-15 alle 17.10.28

thank you to @s.alpaslan and @Hyperbytes