Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Flow template for parsing email

(0) ShareShare
ReportReport
Posted on by 4

Hi there, I'm new to flows. Can someone please guide me or provide a template that I can use to parse an email body and send a new email alert if a particular condition is met.

 

For example. below is the sample template I'm working with. Ideally I want to extract each of the field and store the text associated with the field in a MySQL database or some other DB where it can be queries later.

 

But for now, I want to parse the email and look for keyboard 'hours', if that is found then trigger a new email to specific recipients. 

 

Is this possible? Thank you!

 

Sample Template:
Notification Number: 7433
Date: 01/Mar/2018 07:00:00 - 03/Mar/2018 19:00:00
Activity: Following maintenance is Planned

Service Affected
4845 Circuit Rd, Caledonia (1 x 3 hours)
4745 Acadia Cr, Calendonia (1 x 10 minutes )

  • v-litu-msft Profile Picture
    on at
    Re: Flow template for parsing email

    Hi @hpkv1,

     

    I upload my Flow to this post, you could download it and import it into your Flows to test.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • hpkv1 Profile Picture
    4 on at
    Re: Flow template for parsing email

    Ok thanks. I must be doing something wrong. When I go to view the output, the value has the script instead of the output variable. For ex, Notification Number value has this - split(split(outputs('Compose'),'Notification Number: ')[1],variables('BlankRow'))[0]

  • v-litu-msft Profile Picture
    on at
    Re: Flow template for parsing email

    Hi @hpkv1,

     

    Click run history, and expand the action you will find the variable output.

    Screenshot 2021-02-09 173551.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • hpkv1 Profile Picture
    4 on at
    Re: Flow template for parsing email

    Thanks, I just followed your suggestion but I'm not able to see any output - how can I see the variable output?

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Flow template for parsing email

    Hi @hpkv1,

     

    You could initialize several variables to store these field values. Firstly, we should initialize a BlankRow variable to store an empty row by clicking once "Enter" on the keyboard.

     

    Then initialize these variables as below:

    Notification Number

    split(split(outputs('Compose'),'Notification Number: ')[1],variables('BlankRow'))[0]

    StartDate

    split(split(outputs('Compose'),'Date: ')[1],' - ')[0]

    EndDate

    split(split(outputs('Compose'),' - ')[1],variables('BlankRow'))[0]

    Activity

    split(split(outputs('Compose'),'Activity: ')[1],variables('BlankRow'))[0]

    Screenshot 2021-02-08 173738.jpg

     

    Screenshot 2021-02-08 173816.jpg

     

    If you want to check if the Email body contains the keyword, you could add a Condition action to do that:

    Screenshot 2021-02-08 173930.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >