cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mischa2710
Helper III
Helper III

how can an added document be send to the recipient?

The person who starts the flow should have the possibility to add a document. 

Mischa2710_0-1621610770521.png

Afterwards the flow starts and an approval will be send. Unfortunately I´ve no idea what I´ve to do that the attachment will also be send with the approval.

Mischa2710_1-1621610909894.png

Any idea?

Thanks in advance

Michael

8 REPLIES 8
NiloferA
Solution Supplier
Solution Supplier

Hello @Mischa2710 ,

Please refer this Microsoft Doc which tells you how you can add attachments to your Approvals

https://docs.microsoft.com/en-us/power-automate/approval-attachments

Please mark this Reply as a Solution or give a Kudo if you found it helpful.

Sorry, unfortunately not the solution for my problem. Therefore I tried it with already stored attachments in sharepoint list, but it also didn´t work:

Mischa2710_7-1621773397062.png

Mischa2710_8-1621773501300.pngMischa2710_9-1621773521097.png

 

powercorner
Responsive Resident
Responsive Resident

Hello @Mischa2710 ,

 

a simple solution would be to send to link of the uploaded file (SharePoint) inside the approval. 

But I will show you how to do it directly. Just give me some minutes. I will build the example flow for you 🙂

 

With regards

Kevin

powercorner
Responsive Resident
Responsive Resident

Hello @Mischa2710 again.

 

There we go. Here is the short flow:

powercorner_0-1621790323299.png

 

So what you need to do is split the attachment field into two parts (Name / Content)

For the name you will have the following expression:

@triggerBody()['file']['name']
and for the actual content it will be:
@triggerBody()['file']['contentBytes']
 
Then the notification mail looks like this:(in my example I uploaded a picture)


powercorner_1-1621790509109.png

 

Tell me if it worked

 

With regards

Kevin

 

At first, thank you for your help. Unfortunately it didn´t work. The flow runs and I received an approval with attached document. But I receive an error if I would like to open attached document.

Mischa2710_0-1621839908075.png

Mischa2710_2-1621840010502.png

Did I do something wrong? I uploaded a PPT and a PDF.

I entered exactly your expressions:

triggerBody()['file']['name'] and

triggerBody()['file']['contentBytes']

 

 

hmm strange, what is the error saying in detail? maybe the filesize exceeds the Limit or your firewall blocks the content? can you tell me more about the error? screenshot maybe?

Mischa2710_0-1621843213816.png

The message is that I´ve the possibilty to repair it. But it doesn´t work.

Mischa2710_1-1621843293835.png

The strange thing is, if I run the flow with trigger "when an item is created or modified" everything works as wished and I can open the documents.

 

your tipp for linking documents is also used in my flow. But sometimes the recipeint has no access to the folder and therefore a documents has to be attached. 

Hello again,

 

I tried it again with a pdf and ppt. everything was fine. The only problems I got was when the file was larger then 5MB. 

I took a closer look into your action. The only difference I can see now is that you are using quotes and I am not:

powercorner_0-1621844586999.png

maybe try it without the quotes file.name instead of "file.name"

 

Edit: On the other hand you could give the user access to the file before sending the approval. and then take it from him again when the user approved or declined it?

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.

Users online (1,209)