cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DeleteSystem32
Level: Powered On

Creating a sharepoint list for Server Backup history

Hello Im trying to make a flow that creates items in a sharepointlist.

however Im haveing troubles updateing these items becouse

they are created by the trigger function "when an email is received" 

and later then must be updated with information that is transfered via another email.

 

Heres a Diagram on what should happen and what the list should look like:

 

diagramm.PNG

 

this is how the list should look like

List example.PNG

 

I could think of two possible ways:

 

Way 1:

 

Problem:

the ID of the item does not work throws 404 not found

Way 1 part 1.PNGWay 1 part 2.PNG

 

Way 2:

Problem: does not work is stuck in the dountil forever and i cant really look into it.

The follow up message by the server also triggers the first "when email is received" so you always start a new flow.

 

Way 2 part 1.PNGWay 2 part 2.PNG

5 REPLIES 5
SCTdan
Level 8

Re: Creating a sharepoint list for Server Backup history

For Way #1, what is the result of the Create Item action?  Can you screenshot that?

 

e: Itchy post finger

 

Way #2 won't work.  It can't watch for another event outside the flow (some exceptions apply), so your loop just keeps going.  You need to use a switch-case method like #1 that can handle all the situations, or two separate flows, one triggering on start and one on end.

Community Support Team
Community Support Team

Re: Creating a sharepoint list for Server Backup history

Hi @DeleteSystem32 ,

 

 What do you mean by “later then must be updated with information that is transfered via another email”?

Do you want to create an item based on first email then update the item based on another email?

Are you using the action Html to text to convert the Subject and Body of the email to plain text?

I have made the following test for your reference.

Under the first trigger When a new email arrives, add a Condition to check if the Subject is equal to Started.

Under if yes branch, add action Create item.

Add the second trigger When a new email arrives 2.

Then the action Html to text to convert subject to text.

Add a Switch cases, if the second email subject is equal to fail, update item. if the second email subject is equal to success, update item2.

Please check the following images for a reference.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DeleteSystem32
Level: Powered On

Re: Creating a sharepoint list for Server Backup history

The problem is that multiple server send emails during the day so its not guaranteed that the second incomeing email is by the same server.

 

If lets say coca cola starts a backup and  fanta starts an hour later, but fanta finishes first then the item that has been created by the coca cola server is  updated with the fanta server followup email.

DeleteSystem32
Level: Powered On

Re: Creating a sharepoint list for Server Backup history

Way #1 the create item action works fine its just that when the second email is received finding the right item in the list is not possible via the ID variable created by "create item". it will throw a 404 not found error.

 

The problem is solved when I can get the flow to wait for the right email (check all incoming emails for the servername "subject") if the subject is then equal it should update this item and the flow should end.

 

So therefore, every time a server starts a backup a flow is initialised and only ends when the server is done with its backup sending the follow up email. 

DeleteSystem32
Level: Powered On

Re: Creating a sharepoint list for Server Backup history

What do you mean by “later then must be updated with information that is transfered via another email”?

A flow is triggered when a server starts a backup (it sends a email with Subject=servername
and body=status[in progress,fail,success] the value in the first email is always started)

 

Then when the server is done with the backup either successful or not it sends the follow up email with same servername as subject and the current status as body. Now the flow should be terminated.

 

Do you want to create an item based on first email then update the item based on another email?

yes. There are arround 25 servers that send emails during the day. My problem is updating the right items with the right follow up information.

Are you using the action Html to text to convert the Subject and Body of the email to plain text?

yes. subject= Servername, body=status all in String.

 

 

I have made the following test for your reference.

Under the first trigger When a new email arrives, add a Condition to check if the Subject is equal to Started.

Under if yes branch, add action Create item.

Add the second trigger When a new email arrives 2.

Then the action Html to text to convert subject to text.

-------------------------------------------------------------------

Add a Switch cases, if the second email subject is equal to fail, update item. if the second email subject is equal to success, update item2.

 

Subject is a servername not a status so they subject will never be "fail" "success". If I do that with the Body instead of subject I will have the problem that a backup started by cocacola would be updated with any information comeing in first regardless which server. But it must be updated with the correct information (the follow up email by the cocacola server)

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 89 members 4,185 guests
Please welcome our newest community members: