Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Filtering part of email

(0) ShareShare
ReportReport
Posted on by

Hello! I'm new to this forum and new to using flows.. I tried to create something, but it won't work.. 

 

Here is what I try to achieve:

 

When a e-mail is send to my e-mail adres, I want to check the mail for the word 3S (it's the start of a track trace code) If the mail contents a track trace code (it also can be in HTML) then I want to save the 3S code (and the part that comes after the 3S phrase) to an excel document.

 

So if for example this happens:

I receive an e-mail with the code 3SDLAJ002796980 in it, a row is added to my excel document where only the code is saved.

 

Is this possible? Or am I trying to create something impossible?

 

Thank you!

  • Verified answer
    v-duann-msft Profile Picture
    on at
    Re: Filtering part of email

    Hi @robin91 

     

    Thanks for your posting.

     

    Accordingly to your description, you would like to obtain trace code in emails if exist. If there is any misunderstood, please kindly let me know.

     

    We can use split function to achieve your requirement. Here is my email body:

    v-duann-msft_0-1611555816046.png

     

     

    This is my excel file, you can add more columns if necessary.

    Subject

    Sender

    Code

     

    Then, please check my flow details:

    In code area, we need to filter code info only, the fx I used is :  take(last(Split(outputs('Html_to_text')?['body'],'3S')),13)

    v-duann-msft_1-1611555816052.png

     

     

    v-duann-msft_2-1611555816056.png

     

     

    Once completed, I got date in excel as below:

    v-duann-msft_3-1611555816056.png

     

     

    Hope the content above may help you.

     

    Thanks

    Anna

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,679 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow