cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

ERROR: Save Conflict help

I have a critical flow that just failed. I need some help determining WHY this failure occurred and how to prevent it in the future. 

Flow:

Trigger: PowerApps

Action1: Parse JSON

Logic1: Apply to each

  - Action2: Create File (Sharepoint Doc Library)

    - This is where the error occurred:

 

Save Conflict

Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes.
clientRequestId: 2d9401b7-1149-45f4-8bc1-77485e52c47c
serviceRequestId: 2d9401b7-1149-45f4-8bc1-77485e52c47c

 

  - Action3: Update File Properties (Sharepoint Doc Library)

    - Adds metatdata (columns) to file just created

Flow has been running fine for months.

Oddly enough, there were two files being created; error only occurred on the first. Second file was successful. 

ericonline_1-1596145596392.png

ericonline_2-1596145609080.png

Thoughts on how to troubleshoot this? 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @ericonline 

What you can do is to insert a parallel branch after the Create image file, so that you have one branch that update file properties when the Create action succeeds, and another branch to handle the situation when it fails.

The failure branch could then first inform you (Send email), then a delay, before retrying to create the image file and update the properties.

You could put the above into a Do until loop, that will retry X number of times or for Y minutes - you will have to track the success/failure so you can exit the loop when success is the result. You will also have to handle the event if the Do until loop expires (X loops, or Y minutes) - again with a parallel branching after the loop.

Just be careful with parallel branches, when merging them back into one, the Configure run after options must be set correctly 🙂

Hope the above helps a little. Kind regards, John

View solution in original post

14 REPLIES 14
JohnAageAnderse
Memorable Member
Memorable Member

Hello @ericonline 

Could you describe more about how the files in your flow run were created?

Do you have any other flow running on the same library/list that may have modified the file?

Anything else you could tell us about?

Kind regards, John

Hi @JohnAageAnderse ,

There really isn't much to the file creation:

- Get some attributes and base64 image(s) from PowerApps

- Parse values and base64 out

- Create file(s) from the .jpg base64

- Update properties (columns) associated with file (.jpg)

image.png

- Again, the second file in this case is successful

 

 

- There is another Flow that runs against this Document Library. 

  - How does Sharepoint handle concurrent requests to Documents?

 

Hello @ericonline 

As you are only creating the files in the flow, there should be no concurrent issues.

Could you provide screenshots of how the flow looks like, not the run, but the actions, expanded.

The first image file that is created and fails, does it have a name that already exists in the library? or are the names unique upon creation?

Are there any difference between the two files, meaning the parameters provided from PowerApps?

Could you take the parameters for the first file and manually create the file? For example by using a simple manual flow to hold the values in variables and then create the file from those?

Kind regards, John

1. image.png

2. Filenames are unique. Created in PowerApps with a milliseconds timestamp

3. Differences between two files: Filename, File Content and imageNotes

4. No issue creating the file manually...

  - image.png

Hello @ericonline 

Thank you for the information 🙂

I didn't see that you updated the file properties after the creation. Could you add a delay action between the creation and the update, just to confirm that the update is not taking place while the file is being created. Try with 30 seconds at first.

Kind regards, John

Yeah, the Flow has been running without issue up until this fail, so adding a timer won't positively affirm it as a fix. I need to know WHY this error occurs (the conditions that trigger the error message) so I can mitigate. 

This is a critical Flow, so one fail like this hurts the integrity of my solution as well as the image of Flow as a business critical tool. I want to architect the solution to mitigate against errors like this. But to do so, I need to know what causes the error.

image.png

Hello @ericonline 

What you can do is to insert a parallel branch after the Create image file, so that you have one branch that update file properties when the Create action succeeds, and another branch to handle the situation when it fails.

The failure branch could then first inform you (Send email), then a delay, before retrying to create the image file and update the properties.

You could put the above into a Do until loop, that will retry X number of times or for Y minutes - you will have to track the success/failure so you can exit the loop when success is the result. You will also have to handle the event if the Do until loop expires (X loops, or Y minutes) - again with a parallel branching after the loop.

Just be careful with parallel branches, when merging them back into one, the Configure run after options must be set correctly 🙂

Hope the above helps a little. Kind regards, John

Thank you for the continued engagement @JohnAageAnderse . I'm very interested in your "do until" approach. I've used "Configure run after" in a similar manner, but have never seen the pattern that will retry a Flow if it fails. 

I know its a big ask of your time, but would you mind showing a screenshot of the "do until" actions?

I'd really appreciate it. 

Hello @ericonline 

I can show you one Do until example that we have in production - it is about getting a reason for why a change was made and we uses the Approvals to ask for that.

 

It starts with initialization of variables - one of which is used to track whether or not we had a successful outcome in the Do until loop - that is the variable "ResponseReceived" (boolean, value false).

The Do until loop will continue to loop till either:

  • the variable "ResponseReceived" is true
  • the loop has looped 4 times (see the Count field)
  • or the loop has been running for 9 hours (see the Timeout field)

An approval is requested and we have configured the Wait for approval to only wait 2 hours, after which it fails.

Do until response received or expiredDo until response received or expired

The Condition after the Wait for approval only runs if the Wait for approval succeeded, and it just checks to see if we got a response. If not, we loop one more time! If we got the response, we set the variable "ResponseReceived" to true and the Do until loop then exits.

Now if the Wait for approval expires after 2 hours, then the Condition is not executed, but the following action "ResponseComment eq Please provide a reason for the change" is executed, and we loop again, trying again to get a reason 🙂

If no success, try againIf no success, try again

Hope the above gives you the idea on how to use the Do until loop to check for success, failure, or simply giving up 🙂 We do have an action after the Do until loop that checks for the loop result, so if the loop failed (expired), then the system owner is informed and will contact the "bad" guy 😄

Kind regards, John

panand99
Impactful Individual
Impactful Individual

Hello @ericonline ,

 

I got the same error sometimes while creating file when 'new email arrives' event.

 

Could you please let me know how you used 'Do Until' method in your case? What did you checked in that?(screen shot will be good help).

Also, a 'Cannot open file' is too there for 1 time in same 'create file' action.

 

panand99_0-1611169136317.png

 

ericonline
Community Champion
Community Champion

This problem "just went away". I didn't change the Flow at all, just waited. 

panand99
Impactful Individual
Impactful Individual

Hello @ericonline ,

 

That is Great.

But can you please help on this case how/what to check as I need to add in this condition here.

 

Thanks in advance.

 

Hello @panand99 

Do you have another flow for that document library that reacts when you create a file?

Kind regards, John

Hello @JohnAageAnderse 

 

This problem has been solved, I used a variable and sets it on the case when records is created.

Helpful resources

Announcements

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (5,345)