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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,049)