How to get case sensitive particular value from the string by using Logic app?

George OCAK 70 Reputation points
2023-04-04T08:21:39.3966667+00:00

Hi Team, I converted the email attachment from base64 to string. The attachment is a .eml file, so I need to get the sender from the attachment. When I changed it to string from the base64, I can see the actual sender starts with "From:" as below. User's image

Here are the steps I applied; I am not getting the value that only starts with the "From:" Could you please recommend any applicable steps or correct them if they are wrong? User's image

User's image

User's image

User's image

User's image

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,336 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,656 Reputation points Microsoft Employee
    2023-04-21T14:07:41.6533333+00:00

    @George OCAK Since you are using the single-tenant logic app offering, you can use the inline code action to perform a simple regex match for what you need from the email. Using the following regex should extract the name and the email as separate groups.

    /^From: (.*)<(.*)>$/
    

    You can use the above regex with the match() function for strings in JS within the inline code action.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.