Sunday, August 8, 2021

Power Automate: Send Multiple Attachments In Approval EMail

Hello Friends,

Welcome back with another post on Power Automate. In my last post, we had tried to send multiple attachments (uploaded in a list item) in email through Power Automate. In last, I asked you, what if you have to send all these attachments in "Start and wait for approval" email? Hope you have already implement. Anyways, let's try-

  1. First of all, please visit my last post to create the list and the power automate.
    1. Power Automate: Send Multiple Attachments In EMail
  2. Now, the way, we sent the attachments in an email is little bit different to what we have to do for approval mail action.
  3. For simple Email, the array format was:-
    1. {
      "Name":
      "ContentBytes":
      }
      
  4. For approval email, if you use the same format, it will through error of ContentBytes. Therefore, we will change this format. For approval email, we will use below format.
    1. {
      "Name":
      "content":
      }
      
  5. Rest things will be same. Means-
    1. Declare a variable of Array type using "Initialize variable" action with name as "MultipleAttachmentsArrayForApproval".


    2. Use "Apply to each", "Get attachment content" and "Append to array variable" actions to create the array of attachment contents.


    3. Now add action "Start and wait for approval" and input all the required information. Add this variable in attachments section. For this, please read my last post whose link is given above. We will apply same process here (see point no 27 of last post).

  6. All done. Save the workflow and test it by adding a new item in SharePoint list. Well, I have already one, so I will test in it.
  7. I had created a list item with 4 attachments-

  8. Just clicked on Save button. After waiting a couple of minutes, I got a mail in my mailbox.

  9. Wow, I got a mail to approve or reject the item request. The interesting part is that, all 4 attachments are also got delivered.
  10. This way, you can send attachments in approval email also.
  11. Please note that these attachments will show only in mail box. If you are using MS Teams, then you will get approval request there also but without attachment. Even, if you are using your mobile to approve/reject the request then their also you will not find the attachments.

  12. This way, you can send multiple attachments with Email as well as Approval Flow EMail.
With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.

Stay Safe !
Stay Healthy !

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.