Thank you @ManishSolanki for your suggestions. I had really hoped this would work but it didn't. The flow "succeeded" for a few of the SP records, but it only sent the emails to me as I am cc'd. The flow failed for most of the records. The Send an Email control gives error 'Bad request' for each failed run. Below is a comparison of a successful and failed input from the Send an Email control. I wonder about the 'null' parameter, but it is there for both the 'successful' and failed runs.
Succeeded
{
"host": {
"connectionReferenceName": "shared_office365",
"operationId": "SendEmailV2"
},
"parameters": {
"emailMessage/To": null,
"emailMessage/Subject": "ELSA org chart update request: Project proposals: organization, FAQs",
...
}
}
Failed
{
"host": {
"connectionReferenceName": "shared_office365",
"operationId": "SendEmailV2"
},
"parameters": {
"emailMessage/To": null,
"emailMessage/Subject": "ELSA org chart update request: Sales: US Service Sales organization",
...
}
}
Here is complete code from the Send an Email control.
{
"inputs": {
"host": {
"connectionName": "shared_office365",
"operationId": "SendEmailV2",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_office365"
},
"parameters": {
"emailMessage/To": "@items('Apply_to_each')?['Owner/Email']",
"emailMessage/Subject": "ELSA org chart update request: @{items('Apply_to_each')?['Title']}",
"emailMessage/Body": "<p><span style=\"font-size: 16px\">\nThe Organizational Chart<br>\n<br>\n</span><span style=\"font-size: 16px\"><strong>@{items('Apply_to_each')?['Title']}</span><span style=\"font-size: 16px\"></strong><br>\n<br>\nwas last updated in ELSA on @{items('Apply_to_each')?['ELSAPubDate']}. Please reply to this email and attach the latest version that should be available in ELSA, or a statement that this is the current version.<br>\n<br>\nLink to the file </span><span style=\"font-size: 16px\"><strong>@{items('Apply_to_each')?['{Name}']}</span><span style=\"font-size: 16px\"></strong>:<br>\n</span><span style=\"font-size: 16px\">@{outputs('Create_sharing_link_for_a_file_or_folder')?['body/link/webUrl']}</span><span style=\"font-size: 16px\"><br>\n<br>\nThank you</span></p><br><br>\nThis email was generated by Power Automate",
"emailMessage/Cc": "...",
"emailMessage/ReplyTo": "...",
"emailMessage/Importance": "Normal"
},
"authentication": "@parameters('$authentication')"
},
"metadata": {
"operationMetadataId": "fcc62dac-339d-485a-9f5c-0d01d87a0102"
}
}