
Announcements
I'm using the template for due date reminder for Sharepoint Online tasks list. This flow currently is sending myself an email. I would like to send this email to the person assigned to the tasks. And it could be multiple people. I do not see AssignedToEmail field, only AssignedToName. I'm guessing I have to use "get user profile" from O365 Users to grab the email and append it. Not sure where to input that in the flow. Any suggestions?
Hi @S_Tran,
Because you can assign multiple people the AssignedTo field will also be an array. If you want to retrieve all e-mails in one string you could use a select and join the e-mails with a ; character.
Below is an example of that approach.
1. The Select uses the AssignedTo field from the Apply to Each. The select uses the item()['Email'] to retrieve the e-mail address of every user of that specific item.
{
"inputs": {
"from": "@items('Apply_to_each')?['AssignedTo']",
"select": "@item()?['Email']"
}
}
2. The compose uses the expression below. The compose is just an example. You could also use that expression in a To field of an Send an email action.
join(body('Select'), ';')