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

Community site session details

Session Id : L0fxdvx6fnd8Jx+i4HC9gK
Power Automate - Building Flows
Answered

Condition statement WITHIN the email body

Like (1) ShareShare
ReportReport
Posted on 23 Apr 2019 21:06:10 by 96

I have an email that requires an expression or a condition statement to be validated WITHIN the body of the email based on the value of a SharePoint list column. If the field length > 0 then include additional text. I have started playing with creating variables, but unsure of how to implement within the body section of the 'Send to email' action.

I have the same question (0)
  • Verified answer
    v-yamao-msft Profile Picture
    on 30 Apr 2019 at 09:05:31
    Re: Condition statement WITHIN the email body

    Hi @adove ,

     

    Do you want to show the “dummy” markup dynamically based on the length of the column?

     

    Please try if the following code will work for you. This steatement will retrun Dear <'name'> if the length is greater  than 10, otherwise, it will be blank.

    if(greater(length(triggerBody()?['CC']),10),concat('dear','  ',triggerBody()?['CC']),'')

     

    More details about the WDL functions, please check it at here:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

     

    Best regards,

    Mabel

     

  • adove Profile Picture
    96 on 24 Apr 2019 at 14:33:29
    Re: Condition statement WITHIN the email body

    Inside the body of a 'Send an email' action I have the following "dummy" markup.

     

    If the SharePoint column <'First Name'> contains text 

    then write the following:

    Dear <'First Name'>,

    We are pleased to announce...

     

     

  • v-yamao-msft Profile Picture
    on 24 Apr 2019 at 03:23:25
    Re: Condition statement WITHIN the email body

    Hi @adove ,

     

    Do you want to return texts based on the length of a SharePoint list column?

     

    Please try inserting the following condition in the email body to see if it will meet your scenario.

     

     

    if(greater(length(triggerBody()?['CC']),10),'there are more than 10 characters in this field',triggerBody()?['CC'])
    
    

     

    The flow is configured likes below:

    1.PNG

     

    Best regards,

    Mabel

     

  • AlanPs1 Profile Picture
    2,471 on 23 Apr 2019 at 21:26:47
    Re: Condition statement WITHIN the email body

    Hi @adove , thank you for your post in the community!

     

    I may be getting the gist of this and could potentially provide a solution but could you please post more detail and some pictures of your Flow so I can best advise?

     

    If you have found my post helpful, please mark thumbs up.

     

    Any other questions, just ask.

     

    Thanks, Alan

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 783 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 515 Moderator

#3
trice602 Profile Picture

trice602 299 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete