Hello,
We have a flow that sends an email out to our managers/directors to approve certain items from SharePoint.
But when they receive these emails, they are receiving them with a bunch of syntax errors.
I am looking at both the flow and the coding behind it but I can't seem to figure out exactly what's causing these syntax issues to occur.
Is there a way to possibly remove them?
Screenshots below.Syntax Issue
Flow
Code
Code
Please let me know if there is anything else needed from me regarding this issue.
Perfect! This did it. I will accept this as the solution.
Thank you, @Pstork1 for your assistance with this.
There is an HTML to Text action that you can use to strip the HTML out of a formatted string. Take a look at this thread. Remove html - Power Platform Community (microsoft.com)
Hello @IP ,
That is exactly what I'm seeing. I checked the raw outputs of this action and indeed the approval action is pulling the embedded html code. So that will definitely be what I will be needing help on is finding a way to remove the html tags in the trigger output. This definitely helped point me in the right direction so thank you for that!Raw Action 1
Raw Action 2
Which sharepoint action is providing the "Details" input to the approval action? Can you look at the run history and examine the raw output from that action. I've been pasting the outputs into Visual Studio Code (free editor) and formatting it by selecting it all (Ctl-A) and using Shift-Alt-F. It's amazing what you can learn by looking at the JSON.
I suspect that the details item has embedded html code and that the approval action does something to prevent that being rendered. The documentation here: https://docs.microsoft.com/en-gb/connectors/approvals/#start-and-wait-for-an-approval says it expects "markdown" formatting, which says to me that it's going to ignore embedded html.
If that is the situation, you're going to have to find a way or removing the html tags in the trigger output somehow. I'm afraid I don't know of a way to do that but I'm sure someone else on here will.
IP
That should do it, not sure what else to suggest
I have mine set as HTML and I just ran another test workflow.
I am still getting the same syntax issues.HTML
Syntax issue
Check their email clients. It looks like they have disabled the ability to use HTML formatting in email. I don't know of any way to send the approval emails as plain text. They require the use of HTML for their functionality.
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional