cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grandepaci
Regular Visitor

Adding same attachment in multible emails

Hi all,

 

I have a flow, that is sending an approval. Depending on the outcome, several mails are being sent to the secretary and the requestor.

The user is able to add an Attachment prior to the approval via an PowerApp.

 

I have added the option to display the attachment in the approval mail. I found this solution on several posts. It is working in the approval only.

 

grandepaci_0-1645019414695.png 

 

 

grandepaci_3-1645019571571.png

 

Now i also want to add that same attachment to my mails i send to the diffrent people mentioned prior.

That doesnt seem to work for some reason.

 

When Adding the varAttachment in my "send mail" command after the outcome, i get an error message.

This error message then appears after succesful approval.

 

grandepaci_4-1645020032976.png

 

My theory is, that the for each loop "fill attachment content" is blocking further user of the attachment.

It is not possible to exclude the for each loop when getting the attachment content.

 

I already tried the compose command and creating attachment files on a seperate sharepoint list.

Do you have any more ideas?

 

 

Sincerely

 

Grandepaci

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @grandepaci ,

the format for attachments is different in the email and in the approval task. In the approval task it is:

{
  "Name": <DisplayName>,
  "content": <AttachmentContent or FileContent>
}

but for the email it needs:

{
  "Name": <DisplayName>,
  "ContentBytes": <AttachmentContent>
}


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

1 REPLY 1
tom_riha
Super User
Super User

Hello @grandepaci ,

the format for attachments is different in the email and in the approval task. In the approval task it is:

{
  "Name": <DisplayName>,
  "content": <AttachmentContent or FileContent>
}

but for the email it needs:

{
  "Name": <DisplayName>,
  "ContentBytes": <AttachmentContent>
}


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,686)