cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Process emails

Hello,

I am new in Power Automate. I need some support on processing emails.

I would like to process the emails sent from Veeam once a day (once the backup window has finished) and ensure we have 2 success emails for each job (one for the main backup job and one for the replication job.

We want o get an email daily that will query at certain time to find out whether the jobs have been completed and its status.

 

EX. I have 12 jobs and from those 12 jobs I would need to have one email stating those 12 jobs and saying that those jobs have been completed successfully, have warnings or some critical. this is for the backup and replication jobs.


job 1 = back successfuly completed  or warning or critical

job 2 = back successfuly completed or warning or critical

job 3 = back successfuly completed or warning or critical

job 4 = back successfuly completed or warning or critical

job 5 = back successfuly completed or warning or critical

job 6 = back successfuly completed or warning or critical

job 7 = back successfuly completed or warning or critical

job 8 = back successfuly completed or warning or critical

job 9 = back successfuly completed or warning or critical

job 10 = back successfuly completed or warning or critical

job 11 = back successfuly completed or warning or critical

job 12 = back successfuly completed or warning or critical

 

This is for the backup and replication jobs.

Could I have some support on how to create this automation in power automation please and what steps to take?

 

Thank you,

 

18 REPLIES 18

Could someone supports me on this please?
I have tried to setup but it has been very dificult

Pstork1
Most Valuable Professional
Most Valuable Professional

Yes, this is possible.  But if you don't provide us with the work you've done so far and problems you've encountered, then you are basically asking for someone to do free consulting work and build your flow for you.  Please show us what you have tried and ask for help on issues you are facing.  Don't just give us a scenario and ask for someone to help you build it.

 

From a high level here's what your solution would look like

1) use a recurrence trigger set to run once a day at the time you specify

2) Get all the emails that were sent from Veeam in the last 24 hours

3) process those emails and keep a count for each of the 12 jobs on successful outcome

4) Send the results of the counts by email.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

This is what I have done so far.

baessa_0-1637336463945.png


One of the problems is that the subject would contain different jobs names. And I do not know how I can get the message from the body for each job..

The action I know as I want to receive an email with its status but the flows I am really struggling

Pstork1
Most Valuable Professional
Most Valuable Professional

First, I would create 12 integer variables at the top of the flow.  One for each of the12 jobs you want to track.  Then inside the loop you will check the body of the email to see if that email is a succeed or fail.  Then if it succeeded use a switch based on the Subject to decide which counter variable to increment.  After you exit the loop create an email that reports out the counts of each variable.  (You could also put logic in to check the counts and change them to a succeeded or failed text, but that's more work and not really necessary if you report out the counts by job.)



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

I will give a try. And let you know the outcome.

 

Thank you for your support.

Pstork1
Most Valuable Professional
Most Valuable Professional

Reply back when you have more issues to work through.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

HI @Pstork1 

Apologises for my late reply. Being busy with other priority tasks.

I have created the variables and add the values in the variables, add also the loop but I am struggling to use a switch based on the Subject to decide which counter variable to increment.

Pstork1
Most Valuable Professional
Most Valuable Professional

What do the subject lines for the emails look like?  The key to using a switch is to get a value that is equal to a string.  Each string match leads to a different path.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 

This is what I have:

Variable

name: myvariablename
Type: String
value: Backup job: servers

 

The subject in the emails is like

[Success] servers...

 

This is the info from the body of the email

Backup job: servers...                              Success



I have the loop to check if the subject contains [Success].

If yes then I do not how to use a switch based on the Subject to decide which counter variable to increment.


Pstork1
Most Valuable Professional
Most Valuable Professional

If the Subject line starts with [Success] are there more than one server listed in the Subject?  If not then you need to process the Subject line to isolate just that server name.  That is what the switch then runs on.  If there are more than one, then you need to isolate each server name into an array, probably by using a Split() based on whatever separates the server names.  Then use a loop with the switch inside to process each server name separately.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

I have other jobs and all starts with [success] with different job names.

In that case the loop can filter for all jobs or do I have to isolate each email subject that is from the jobs.?

Pstork1
Most Valuable Professional
Most Valuable Professional

Are the counters you are incrementing based on the job names or the server names?  You'll isolate whatever is in the subject line that will let you increment the correct counter.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

It is base on job names... The one I gave above is just an example. whithin the job it does states the details which includes the server names.

Pstork1
Most Valuable Professional
Most Valuable Professional

Then do what I said before, but you will be working to isolate the individual Job Name(s) in the Subject and switch based on those names.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Not sure what is failing but after testing this it gives this error

baessa_0-1641470102046.png


This is my switch:

baessa_1-1641470188199.png



What I am doing wrong.
The variable is like this:

Variable

name: myvariablename
Type: String
value: Backup job: servers

Pstork1
Most Valuable Professional
Most Valuable Professional

Your condition can't have three different target phrases in one box.  You need to use Add three separate lines where Subject Contains and then each of the three phrases.  Set the connector for OR.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Okey it seems that using [Success] works but it sends me a lot of emails.

So if I add more values then it will send multiple emails right or how can I do it to receive only one email after the flow has checked all 12 or more emails to check the status of the backup jobs.

This is an example if my veeam notifications. I did not have 3 targets, only the subject name

 

 

Capture.PNG



Pstork1
Most Valuable Professional
Most Valuable Professional

If you add more values into the condition and set the connector to and it will send fewer emails because it will only send an email if all conditions are met.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (753)