Send Approvals and Normal email with Multiple Attachments.
- K DINESH
- Aug 9, 2020
- 1 min read
Scenario :- If User Creates new item in sharepoint list then take the attachments from the list and send approval email with attachments and send normal email with attachments.
Step 1:-
Login to Flow -> search for When an Item is created (from SharePoint ) add it as Trigger. Then add Get Attachments from SharePoint and select the ID from Dynamic content.

Step 2 :-
Search for Variables and select Initialize a Variable then name the variable as per your interest.
Here it is emailVar & approvalVar.

Step 3 :-
Add the get attachment content from sharepoint list then add the Site Address and list name .
Choose Id from Trigger Body and File identifier from Get Attachments.
Next click on Add an action inside the loop then search for Append to Array variable choose the variable name which you declared previously and add the following code to the Value.
{
"Name": @{items('Apply_to_each')?['DisplayName']},
"ContentBytes": @{body('Get_attachment_content')['$content']}
}

Once you run the Flow then you will see like this.

Step 4 :-
Click on Add an Action then add the get attachment content from sharepoint list then add the Site Address and list name .
Choose Id from Trigger Body and File identifier from Get Attachments. Add Append to array variable and choose the variable from the drop-down in the Value paste the below code.
{
"name": @{items('Apply_to_each_2')?['DisplayName']},
"content": @{body('Get_attachment_content_2')}
}

Step 5 :-
Add Send an Email in the Attachments choose the emailVar. Reason to choose the emailVar is Send an email card expects the data in ContentBytes .

Step 6 :-
Add the Approvals and in the Attachments choose another variable here it is approvalVar.

Happy Learning. 😄👍👍
Comments