Hi, I have to build a flow where I am sending multiple emails based on SP list which has list of data providers, data approvers, deadline date.
Each email will go to 2 people- Data Provider and Data Approver. And in each email I want to dynamically have data provider's first name and deadline date.
Image 1
First I used Get items to link SharePoint list. Then I selected data provider's and data approvers' emails. Then i extracted unique emails using union for Data providers and data approvers.
Image 2 & 3
I used apply to each loop (Loop2) based on unique data approvers emails. Then i used filter array 2 to filter data matching based on data approver email id. Then I used select tool to get columns I need from whole data set.
Image 4 & 5
Then I used apply to each loop (Loop1) again for unique data provider's email id. I used filter array to filter data related to data provider from filtered data in above data set. (Note Loop1 is inside Loop2) Then I used Parse Json so that i can use fields from filter array.
Then I created HTML Table (which I want to sent with each email ) contains- Input Number, Input Name and link.
Image 6
I used format html table to use in email body. Then applied condition that if output from filter array is not empty , then send email.
Image 7 & 8
I used send email v2 action to send emails.
Problem
My flow is working absolutely fine. Its is able to send emails to data providers and data approvers with HTML Table.
But I need dynamic content like
"Hi *******data provider's first name,
The deadline date is ****
HTML Table output
Thanks"
Is there any way I can include fields from HTML Table to send emails without creating Loop3.