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 / Help Needed: Extract C...
Power Automate
Unanswered

Help Needed: Extract Company Names from Outlook Emails to Excel using Power Automate

(0) ShareShare
ReportReport
Posted on by 2

Hello Power Automate Community,

 

I need some assistance with a workflow I'm trying to set up. Every day, I receive newsletters in my Outlook inbox that contain the names of various companies. My goal is to extract these company names and list them in a single Excel file, with each name in a separate row.

Upon inspecting the HTML code of these emails, I noticed that the company names are always enclosed between the strings  border:0"><tbody><tr><td style="font-size:14px; color:#11304d; font-family:'Open Sans',sans-serif,Arial,sans-serif; line-height:22px"><b style="color:#11304d""#11304d"> and </b>.

 

Could someone guide me on how to create a flow in Power Automate to accomplish this?

 

Any detailed steps or example flows would be greatly appreciated!

 

Thank you in advance for your help!

 

Filger

 

Categories:
  • TYL Profile Picture
    1,091 Super User 2024 Season 2 on at

    Hi @Filger  ! I am sure there are much easier ways, but this is how I've done it:

    Tjan_0-1718792811444.png

    1. Used Find text position for the starting position (in your case:  border:0"><tbody><tr><td style="font-size:14px; color:#11304d; font-family:'Open Sans',sans-serif,Arial,sans-serif; line-height:22px"><b style="color:#11304d""#11304d">)

    2. Used find text position for the ending position (in your case: </b>).

    3. Used Substring function to find the text between the two positions:

    - Starting position is the output of step 1

    - Length is the expression: sub(body('Find_text_position_Eind_Timextext'),body('Find_text_position_Begin_Timedtext')). Both variables being respectively the output of the End position and Begin position.

    - Content is in all cases just your HTML email output.

  • Filger Profile Picture
    2 on at

    Hi Tjan, 

     

    thank you for your suggestion. How do you export the results in Excel? Please note that I would like to export each string comprised between the values. 

     

    Thanks again

     

    Filippo

     

  • TYL Profile Picture
    1,091 Super User 2024 Season 2 on at

    @Filger  Ah I was under the assumption that you had only one company name to extract.. That makes things a bit difficult. By best bet would be to use the prompts (from AI builder) function in which you write a prompt that extracts company names. Make sure to tick on 'output as JSON'. Via this way you will get an array with all the company names. 

     

    Make sure to parse this JSON in Power Automate, afterwards add a 'Excel add new row to table' action and map the identified company name to the required values. You will notice that an apply to each will be created (this is good! Because Power Automate takes into consideration that there are multiple company names).

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard