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

Community site session details

Session Id : ubnLv2H+LHTBLJpl0+H8JK
Power Automate - Building Flows
Unanswered

Parse specific text from email to SharePoint List

Like (0) ShareShare
ReportReport
Posted on 9 Feb 2023 15:22:11 by 29

Hello all, 

 

I am trying to build a flow that parses specific text from an email to SharePoint. 
The email's format is always like the one below but there could be multiple lines:

mate_0-1675955578117.png

This is so far my flow but I am stuck as I don't know how to select the specific text and, eventually, how to repeat the same step multiple times (in case there are various expenses)

mate_1-1675955866326.png

Any suggestions are welcome.

 

Thank you! 

  • ishman Profile Picture
    2 on 28 Jan 2024 at 13:40:16
    Re: Parse specific text from email to SharePoint List

    after the Converting the HTML to text you need to write in the "search" criteria so the items get added to the proper cell in the row of your LIST

    first(skip(split(body('Html_to_text'), 'Delivery Method: '), 1))

     

    So, in simpler terms, this code extracts the information following the "Delivery Method: " string from the email body. It uses a combination of functions to split the text into segments, skip the initial part, and then take the first remaining segment.

     

    1.`body('Html_to_text')`: This part retrieves the text body from the email. `Html_to_text` is a function or action that takes
        the HTML content of an email and converts it into plain text.

     

    1. `split(body('Html_to_text'), 'Delivery Method: ')`: The `split` function divides the text into parts based on the specified delimiter,
            which is `'Delivery Method: '` in this case. This means that the text will be split wherever it finds the string
            "Delivery Method: ". The result is an array of text segments.

     

    1. `skip(..., 1)`: The `skip` function is used to skip a specified number of items from the beginning of a collection.
                                  In this case, it skips the first item in the array produced by the `split` function.
                                  This is done because the information of interest follows the "Delivery Method: " string, and the first item in
                                   the array may contain content before this string.

     

    1. `first(...)`: The `first` function retrieves the first item from a collection.
                          In this case, it gets the first (and only, after skipping the initial segment) piece of text after the "Delivery Method: " string.

     



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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete