Introduction:
{
"Name": @{items('Apply_to_each_2')?['DisplayName']},
"ContentBytes": @{body('Get_attachment_content')}
}
The flow was executed without any errors, and I received the expected email. However, the attached files were missing from the email.
It became evident that the attachments were not being successfully included in the email. Therefore, in this blog, we will thoroughly examine the procedure for sending multiple attachments using the “Start and Wait for an Approval” action within Power Automate. Our focus will be on resolving the specific issue that arises when attempting to send attachments using this particular action. Let’s dive into the step-by-step process and find a solution to this problem!
Solution:
Step 1: Initialize the array variable.
Step 2: "Get attachments" action in Power Automate returns all attachments for given item in the array.
Step 3: To read all the attachment contents, click on the next step and then select the "Get attachment content".
Step 4: Proceed to the next step and select the “Append to array variable” action inside the apply to each loop.
- Now select the variable ApprovalAttachment that you have previously created.
- Configure the value using the following JSON structure:
Name: Set the display name from the dynamic content.
Content: Set the attachment content of the Get attachment contents from the dynamic content.
{
"Name": @{items('Apply_to_each_2')?['DisplayName']},
"Content": @{body('Get_attachment_content')}
}
Conclusion:
So, this is how we can easily send attachments without encountering any issues using the approval action.
No comments:
Post a Comment