cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

Attaching multiple documents dynamically for Approval Flow

I have a SharePoint list where am starting my approval flow when a new item in created. The requirement is number of attachments for each item submitted can be 1 or more which is not fixed number. How can I tell my flow to send those attachments in my approval email? Its clear in the action for fixed number of attachments. But when the number of attachments is only known during item submission, how can I deal with this?

 

RameshMukka_0-1601199522957.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi again!

Not sure if base64() will make the difference as explained in this great article

https://blog.mattweston365.com/2020/03/sending-multiple-attachments.html?m=1

 

If not succeed, please note I just searched for the error text and found a promising thread in this same forum

https://powerusers.microsoft.com/t5/General-Power-Automate/Power-Automate-approval-with-Attachments/...

 

Hope this helps

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

5 REPLIES 5
Super User III
Super User III

Hi!

On the 'Start and wat for an approval' attachments section you can see an icon on the right (capital T surrounded by a square). When you click on it you switch into Input Array mode, meaning you can buid an array whose elements are your file attachnents and assing it as its input.

Same approach as the one described in this thread

https://powerusers.microsoft.com/t5/Building-Flows/Creating-array-of-attachments-for-apporval-email/...

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes I exactly did it and somehow the flow is failing at getting the contentbytes. Here is what i have with error

 

RameshMukka_0-1601209335456.png

 

My expression for getting attachment content

 

outputs('Get_attachment_content')?['body'].$content

Attachment Content Error.PNG

 
 
 

I have used my AllAttachments Variable in the approval action. Dont know what is going wrong here.

Attachment Content Error2.PNG

Hi again!

Not sure if base64() will make the difference as explained in this great article

https://blog.mattweston365.com/2020/03/sending-multiple-attachments.html?m=1

 

If not succeed, please note I just searched for the error text and found a promising thread in this same forum

https://powerusers.microsoft.com/t5/General-Power-Automate/Power-Automate-approval-with-Attachments/...

 

Hope this helps

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

@efialttes Thank you so much. Replacing ContentBytes with Content has fixed the problem.

 

RameshMukka_0-1601215559320.png

 

@efialttes @yashag2255 I lately noticed that attachments coming to email are corrupted. Is this something to with base64 conversion?

 

Once again this is how my array is looking like and my expression

 

Attachment Content Error3.PNG

body('Get_attachment_content')['$content']

Also used this outputs('Get_attachment_content')?['body'].$content. 

 

What are the differences between both of them? Which one should I be using?

 

In both cases my attachments are corrupted.

 

Attachment Content Error4.PNG

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (37,272)