Logic App "To:" field in Send email step

Joseph Dutton 150 Reputation points
2023-06-14T14:38:21.9433333+00:00

Attempting to create a Logic App in Azure to dynamically fill the recipient field of the Outlook "Send an email (V2)" step based on Microsoft Sentinel data provided. So far, the error I am receiving is a "One or more recipients are invalid." and a "recipients must be resolved before a message can be submitted." I am sure there is a better way of doing this than what I currently have.

Since Microsoft Sentinel incident is still in preview, I am hoping a better way to do this gets added in the future, but so far, this is what I do:

I currently "Parse JSON", with the JSON schema needed to pull the content from the Sentinel incident, then I "Create HTML table" with the expression that I need to pull the relevant email address from the incident.(I know a table is not what I want, which is what I think is the problem, but not sure how to remedy the solution). The Output of the HTML table reads correctly if the Output is in the body of the email, but when I fill the Output in the Recipient field, it fails. I'm assuming partly to the HTML formatting it gives the email address, reading out something like:

<table><tbody><tr><td></td><td>~emailaddress~</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></tbody></table>

Looking for a way that I can use this dynamic "Output", in the "To:" field of the e-mail address so I can automate sending these emails to the affected users.

User's image

Thank you for any help you can provide on this one!

--Joseph

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
Microsoft Security | Microsoft Sentinel
{count} votes

1 answer

Sort by: Most helpful
  1. Tulika Priyadarshini 165 Reputation points Microsoft Employee
    2023-06-16T10:45:38.5466667+00:00

    There is a new HTML to text converter. https://powerusers.microsoft.com/t5/General-Power-Automate/Removing-HTML-Text-Code/td-p/731195

    Please try using this to get the content from the HTML text.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.