Add all uploads to email in Power Automate + correct file formats

I have my form and documents process set up on Plumsail.
I've also set up a Power Automate flow to carry out a few actions.

I have two attachments fields: one for just photos, another for a mix of photos & documents.
The first field, I've programmed it on PA to insert any/all photos uploaded to the form onto the final document.

I can't work out how to attach files (uploaded through my second attachment field) to my "Send an email" action in Power Automate.

  • all files uploaded to the 2nd field need to be attached to the "Send an email" action individually
  • files should be assigned their correct file formats

I've tried this:


image
Additional doc as shown above should contain both the final doc and all the other attachments.

But all I'm getting on the email are just 2 files, final doc and only one attachment from the 2nd field.
Both missing their file extensions so windows doesn't know how to open the files.

  1. How do I attach a mix of files (images & documents) to my email
  2. How do I assign them their correct file formats, so if users upload 1 jpg and 1 pdf, the email attachments should show 1 PDF (final doc), 1 jpg, and 1 pdf.

I've also tired doing it like this:


image
which worked perfectly except for the 2nd attachment, the email will only have one attachment even if user upload more than one, and file extensions are missing because I've not added them in the name field (above).

I need this second attachment to actually attach as many files as users have submitted on the form and assign them their respective file formats.

I've tried so many things, I don't even know what to do anymore.
I would rather stick to my second approach (above) as it's simpler and easier for me to understand and potentially update in the future.

Any help? Thanks.

Dear Viorel,
There are a few other issues apart from the extension. You definitely don't want this to be inside of the Apply for each loop or you will add the same document many times:

Only files that can be repeated, such as Attachments, need to be inside of Apply to each loop (as this will run for every attachment that you have), but your main result file needs to be outside of it.

It can be done before or after, but outside of this loop:

P.S. I would generally recommend building a simpler testing flows, where you can test some functionality and fine tune it, to make sure it runs exactly as you need it to, then combining all the pieces.

Due to my rudimentary understanding of Power Automate, I couldn't figure out how to resolve this.
I've resorted to sticking with just one upload field and restrict uploads to photos only.

Thank you very much for all the help!

1 Like

I'm trying to do something similar. I have a flow that is much like what you've written here. Once a form is submitted the attachments are put into an area, then I have start document generation process and then I want append the array to include the Result file which is a pdf. However, when I try put .pdf in the Name, it tells me my JSON is incorrect and it won't let me save the Flow. Any suggestions?

EDIT: I figured it out, need to include " around "dynamic content.pdf"

1 Like