Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Approval email syntax issues

(0) ShareShare
ReportReport
Posted on by

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 IssueSyntax IssueFlowFlowCodeCodeCodeCode

Please let me know if there is anything else needed from me regarding this issue.

  • Community Power Platform Member Profile Picture
    on at
    Re: Approval email syntax issues

    Perfect! This did it. I will accept this as the solution.

    Thank you, @Pstork1 for your assistance with this.

  • Verified answer
    Pstork1 Profile Picture
    65,957 Most Valuable Professional on at
    Re: Approval email syntax issues

    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)

  • Community Power Platform Member Profile Picture
    on at
    Re: Approval email syntax issues

    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 1Raw Action 1Raw Action 2Raw Action 2

  • IP Profile Picture
    16 on at
    Re: Approval email syntax issues

    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

  • Pstork1 Profile Picture
    65,957 Most Valuable Professional on at
    Re: Approval email syntax issues

    That should do it, not sure what else to suggest

  • Community Power Platform Member Profile Picture
    on at
    Re: Approval email syntax issues

    I have mine set as HTML and I just ran another test workflow.

    I am still getting the same syntax issues.

    HTMLHTMLSyntax issueSyntax issue

  • Pstork1 Profile Picture
    65,957 Most Valuable Professional on at
    Re: Approval email syntax issues

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow