I have a custom list named data, which contain Email Address field + another list named documents , where for each custom item there is a folder with the itemID.
now i wrote a manual workflow which should loop through all items >> get the related documents >> create a sharing link for the document and share it with the Email Address. then send a single email to each unique email address with the links to documents. here what i currently have:-
1) Initializing 2 variables; one to store the unique email addresses + one to store the email body which should contain all the links to documents
2) then i am getting all the items
3) then i am building the array of unique email addresses:-
4) then i am looping through the email address array >> for each email i am getting the related items >> getting the related documents >> share the documents with the item's email address, as follow:-
now everything is working well till this level. the email body contains the related links. but how can send one email to each unique address? as when i define a send email outside the Apply_to_each i can not reference the email addresses? any advice?
here is an overall layout of the current flow:-