Using Power Automate to attach different file types

983
4
07-25-2022 01:56 PM
Hammers211
New Contributor III

I am struggling with making a particular Power Automate flow. Here is what I would like:

1. Survey response is submitted with a file attachment, a photo, and an email address

2. An email with attachments is sent in response to the survey submission. The attachments are the file attachment and photo.

I am able to create a flow that will send one or the other, but not both. I think the issue is that I am not setting the dynamic content for the file contents correctly. When I set up the flow for sending just one item, I am able to select "Body" for the file contents, and the flow functions as expected. When I try to add the second attachment, I am not able to select "Body" for the file contents. The flow does create two attachments, however the second is always a corrupt file. Thanks for any help!

4 Replies
TL2
by
Occasional Contributor III

Are you initializing an array with your photos and then adding the array variable to your email?

Hammers211
New Contributor III

No, not at this point. If I will only have 1 image and 1 file, is it possible to do it without an array?

0 Kudos
TL2
by
Occasional Contributor III

No, but its also fine for an array to have one item. 

Hammers211
New Contributor III

I have figured out how to initialize, append, and attach a single variable to an email, but when I try to repeat the process for a second variable, I am getting an error:

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Append_to_array_variable_2' at line '1 and column '2797' cannot reference action 'HTTP'. Action 'HTTP' must either be in 'runAfter' path or within a scope action on the 'runAfter' path of action 'Append_to_array_variable_2', or be a Trigger.'.'.

Any help on doing with with the second variable?

0 Kudos