Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
 View Only
  • 1.  Correct Syntax for If statement in body of email

    Posted Feb 01, 2023 09:18 PM
    I am using the Office 365 groups connector - When a group member is added or removed. When a member is removed the raw output is as below

    {
      "@odata.type""#microsoft.graph.user",
      "id""351f70bc-ce89-457b-97ae-247fe0fb0ec8",
      "@removed": {
        "reason""deleted"
      }
    }
    I am trying to write an if statement expression to insert in the body of an email so that if the reason is deleted it inserts the text "Removed". I can not figure out the correct syntax

    if(triggerOutputs()?['body/@removed/reason'] = 'deleted','removed',' added')

    I am not sure how to refer to the result in the output. Can anybody correct this for me?

    Thanks, Steve


    ------------------------------
    Steve Myles
    ------------------------------


  • 2.  RE: Correct Syntax for If statement in body of email

    Posted Feb 02, 2023 08:42 AM
    Please try the following:
    if(equals(triggerOutputs()?['body/@removed/reason'],'deleted'),'removed',' added')
    Hope this helps.

    ------------------------------
    Jeff Rath
    Sr. System Analyst
    Okuma America Corporation
    Charlotte NC
    7045887000
    ------------------------------



  • 3.  RE: Correct Syntax for If statement in body of email

    Posted Feb 02, 2023 07:31 PM
    works perfectly
    Thanks for taking the time

    ------------------------------
    Steve Myles
    ------------------------------