Hello,
I have a set of flows that monitor an email address and saves the PDF's attached if they fit my criteria. The flows work 99% of the time but they are failing randomly. If I resubmit the flow, it always works.
They always fail with:
Error: Action 'Condition_2' failed
Error Details: An action failed. No dependent actions succeeded.
The dependant action is "Create File".
Any help would be much appreciated.
Adam Auteri
Hi @NiloferA
That has worked. I have attached what we did to solve this issue in case anyone else needs it.
I added a condition after the Create File step that runs if the previous step fails and used fx "
Hello @Auteri ,
I don't think there is anything you could do in the Flow to identify if there is an active running instance of the Flow, but perhaps there is one option for you.
As per your Reply above, it seems like the Flow is running in quick succession and only the first run is required and the subsequent ones should be cancelled.
You can do the following to implement this,
This will not prevent the unnecessary runs but will handle the error which arises due to the immediate executions
Let me know if you have any further questions
Hello @NiloferA
I am pretty sure I have worked out the issue, the one flow is sometimes being triggered multiple times very quickly.
The PDF's I am saving are called Schedules. When a Schedule is created or edited an email is sent with the PDF attachment of the Schedule. If a Schedule is created then changed in quick succession, then the system creates multiple emails, all with a PDF with the same name. This means that at times the emails will trigger the flow multiple times in quick succession. This is causing the file to be "locked" when the flow is triggered a second time.
Is it possible to add something into the flow to check that it is already running, and if it is, delay the second instance of the same flow?
Or maybe another option?
Hello @Auteri ,
Yes this kind of issue can occur when there are multiple flows trying to perform some action on the same file or if the file is in use by some user and Flow is trying to perform some action on it.
There are a couple of things you can do
To answer your question about if you can re trigger your Flow if it has failed, I am not aware of any such configuration currently, but as explained in point 2 above, if your actions have failed you can update some Flag in your item and have your Flow check this Flag at the time of trigger when an item is modified, and it will re trigger if the condition is satisfied (And if your current Flow Trigger is when an item/file is created or modified).
Hope this helps!
Please give a Kudo if you found this helpful or Mark this Reply as a Solution if it solved your problem.
Hi @NiloferA
I run multiple flows working out of the same mailbox, but each flow is triggering based on the initial text in the email as to whether it runs or not (e.g. QLD12-74, QLD21-58, QLD21-76).
There are times when a flow is triggered to create the same file (E.g. for an updated PDF), but very rarely in quick succession. When the flow triggers like this it generally overwrites the existing file.
Could the issue be caused by someone accessing the file at the time that the flow runs?
Is it possible to have the flow trigger again if the file creation set is fails? I have seen this asked before but I can never find an adequate response.
Hello @Auteri ,
Is it possible that multiple Flows are running on the Same File?
According to the error, the Flow is not able to open the File but it looks like the File is already created. I suspect that the File is being accessed/used my multiple Flows, whichever is working on the file first, locks the file for the other.
Let me know if this makes any sense to you.
And in text form:
{"statusCode":400,"headers":{"Vary":"Origin","X-SharePointHealthScore":"2","X-MS-SPConnector":"1","X-SP-SERVERSTATE":"ReadOnly=0","DATASERVICEVERSION":"3.0","SPClientServiceRequestDuration":"142","SPRequestGuid":"9366166c-280c-44ca-ac56-ff534c634d6e","request-id":"9366166c-280c-44ca-ac56-ff534c634d6e","MS-CV":"bBZmkwwoykSsVv9TTGNNbg.0","Strict-Transport-Security":"max-age=31536000","X-FRAME-OPTIONS":"SAMEORIGIN","Content-Security-Policy":"frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com;","MicrosoftSharePointTeamServices":"16.0.0.21312","X-Content-Type-Options":"nosniff","X-MS-InvokeApp":"1; RequireReadOnly","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Cache-Control":"max-age=0, private","Date":"Wed, 26 May 2021 00:51:35 GMT","P3P":"CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","Content-Length":"335","Content-Type":"application/json","Expires":"Tue, 11 May 2021 00:51:36 GMT","Last-Modified":"Wed, 26 May 2021 00:51:36 GMT"},"body":{"status":400,"message":"Cannot open file \"https://arriumcloud.sharepoint.com/sites/NRGeneralSchedules/Shared Documents/QR Const - 137 - Caloundra St Central SS/Schedules/CALL_OFF_QLD21-137-137-0115.pdf\".\r\nclientRequestId: 9366166c-280c-44ca-ac56-ff534c634d6e\r\nserviceRequestId: 9366166c-280c-44ca-ac56-ff534c634d6e"}}
Hello @Auteri ,
For the Create File Action when it has errored out, you have a link under Output which says "Click to download", can you please click on it and share a snap of the same,
It may contain further error details which will help troubleshooting the issue.