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 / Flow template for pars...
Power Automate
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 )

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

  • hpkv1 Profile Picture
    4 on at

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

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    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

    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
    Microsoft Employee on at

    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.

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
Vish WR Profile Picture

Vish WR 376

#2
Valantis Profile Picture

Valantis 361

#3
David_MA Profile Picture

David_MA 294 Super User 2026 Season 1

Last 30 days Overall leaderboard