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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extracting Text from E...
Power Automate
Unanswered

Extracting Text from Email

(1) ShareShare
ReportReport
Posted on by 49

I want to create a flow that will parse text from Outlook and then create a Salesforce record/case. I need to parse the company name from this sample text "NNB-ENS-2911 has been down for at least 30 minutes." And the company name isn't always in the same location. Thanks

Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,298 Super User 2026 Season 1 on at

    Hi @cswanson22 ,

     

    I just shared this on another post and it works here too.  Essentially you will use the html to text action and turn the body of the email into text.

     

    Next you will need to use an expression like substring() in a compose action to extract the company name; the position of the company name in the email doesn't matter as long as you can identify a pattern.

     

    Again, different example, but I was looking for the work "Closed" in an email, and then based on the condition being true or false, do a subset of actions.

     

    trice602_0-1706640446076.png

     

    Without seeing the actual email, one way I may approach this is to look for the character position of the text "has been down" in the email and then use substring to get "NNB".  So continuing here, I would use one compose action to find the character position of my phrase in my email body, and another compose to get the company name:

     

    substring(outputs('Html_to_text'),sub(outputs('where_my_phrase_starts'),13),3)
     
    So if the body of the email was 777 and the phrase starts in position 100, I would get the substring of 777 characters starting in position (100-13) = 87, and get the next 3 character "NNB".

     

    trice602_1-1706640562890.png

    Again, there will be variations to consider without seeing the actual email but I find it easier to find a constant phrase within an email template and then dynamically clip the value you need.

     

     

     

     

  • cswanson22 Profile Picture
    49 on at

    I will give this a try. Thank you

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard