When Email Arrives - create variable from subject RRS feed

  • Question

  • I am using the When email arrives then from this email i am getting the attachment and sending a new email with the Body of the email changed from the original.

    This works fine.

    What i need to do is from the original email get certain text from the subject and create a variable to put in the body of the new email.

    Is there a way to do this, i have tried different expressions but with no success.

    Any help would be appreciated 

    Thursday, March 21, 2019 10:08 PM

All replies

  • Hello,

    The 0365 connector is very flexible ,it gives you the required properties in  JSON .You can get the subject and body part from the trigger request and can Construct your own HTML content using either azure functions , string concat in build functions or through HTML table content .

    Below is the sample email trigger body which shows the required paramters


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Friday, March 22, 2019 2:29 AM
  • I understand that thanks, so if in the subject string there was a reference that changed for every email, is there a way to say if a string begins with XX get the characters after until the next space.
    Friday, March 22, 2019 9:45 AM
  • Maybe...

    While you can do a fair amount of string parsing using expressions, anything 'complicated' or dynamic would require that logic be written in an Azure Function.

    You can find the built-in String Function here: Functions reference for Workflow Definition Language in Azure Logic Apps

    Monday, March 25, 2019 2:58 PM