cancel
Showing results for 
Search instead for 
Did you mean: 

Adding an Attachment to an Approval Email In Flow

You should be able to attach a document to an approval email using flow. 

Status: Started

We are now working on the functionality to attach files to Approval requests.

Comments
Level: Powered On

I've just created my own working solution for this but it's far from perfect. The start Approval action doesn't include an Attachment field, so any attachments I was adding to the List item were not visible to the Approver. If the Markdown [Link Text](Link URL) actually worked it would have looked better, but I wasn't able to get it to work. Each attachment is bulleted and clickable to open the file directly; it just doesn't look clickable. 

Approval with Attachment Links

Level: Powered On

The trigger is when a new List item is createdstep 1 - list item is created trigger.JPG

 

Then you Get attachments attached to the list item and initialize two variables; one that is an Array and one that is a String. step 2 - Get Attachments and init variables.JPG

 

Now we start the Apply to each for all the attachments. This is part one where we are getting the attachments. Note that File Identifier (lowercase id) is from the previous Get Attachments action. I know that attachments are already stored in a hidden directory, but I'm placing them into a shared directory that doesn't require to open the List item.  For the Append to an array variable, you are building an array of each attachment. You have to do a hard return before and after the site URL and File Path. I tried to use \n but the Approval process just exceptions the Markdown by changing it to \\n. Doing hard returns makes sure to keep it as \n. The * at the beginning is to make it a bulleted item, and if you don't do a hard return after it will do a sub-list of the first item. step 3 - to each part 1.JPG

 

Now to complete the Apply for Each we need to flatten the array into a single string, or it will attempt to wrap your Approval in another Apply for Each attachment.  I just repeated the first one so you can see how it continues. Do a Join form the Array and enter two spaces in the Join with. Set the attachmentString to use the Output from the Join. step 4 - to each part 2.JPG

 

Now you can include the string of all the file paths the Details of your Approval. step 5 - send approval.JPG

 

Power Automate Staff

A little sneak peak 🤫

image.pngimage.png

Level: Powered On

Awesome. When will this be released?

Power Automate Staff
Status changed to: Started

We are now working on the functionality to attach files to Approval requests.