web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Hide text in send emai...
Power Automate
Answered

Hide text in send email body

(0) ShareShare
ReportReport
Posted on by 90

Hello Everyone,

 

Just wondering how you can hide some text in the html code I have in the email body? 

 

I have an html code to display contact information of the user who submitted the form. Sometimes the user who is submitting the form doesn't have a mobile number. So I don't want to display the text "Mobile:" in the contact information.

 

<div style='display:inline;visibility:hidden;'> Mobile: @{variables('Mobile')}</div>

 

I tried setting the visibility property using a variable which gives the correct output in the flow. However in the email I still see the word "Mobile:"

 

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    mahoneypat Profile Picture
    1,720 on at

    You could use an approach like this.  Create a compose like below and then use that in your email.  It checks the length of the Mobile variable and returns Mobile and the number if >1 or empty '' if not.

     

    mahoneypat_0-1637634745118.png

     

    if(greater(length(variables('Mobile')),1), concat( 'Mobile: ', variables('Mobile')), '')
     
    Pat

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard