
Background
I receive emailed excel data files from two third party logistics providers every night. Three emails from one and fourteen from the other. There is one excel file in each email and the files have standard names.
I created two Flows that save the attachments to both Sharepoint, so that my colleagues can access them, and to Google Drive.
I then created two scripts in Google Drive that checks for the files periodically, and when they are all there combines the data from them into a nice summary report which is emailed to management.
[I am much more comfortable with Excel VBA than Google Apps Script, but server-side VBA seems to be a distant dream; so anyway, I taught myself javascript]
The problem
All this worked perfectly. I became an immediate fan of Flow, extoling its virtues to anyone who would listen. But after a few weeks of seemless performance, it has started failing.
The first emails to arrive are the group of three. The Flow succeeds for one of them but fails for the other two. The failure is "Failed to communicate with Google Drive: Unauthorized. Details: 'Invalid Credentials'"
The second group of 14 emails succeeds for around half (it varies) and fails for the other half. The error reason is the same.
What I have tried
First step was to de-authorise Google Drive and re-authorise it, and then I turned off the two Flows and created new ones from scratch. Sadly the failures continue.
Now what?
My guess it that Google Drive is choking on high-speed repetitive file creation from an external source. So I need to build in a delay, but if I delay all fourteen files by, say, 20 seconds, then they will still all arrive at the same time in GDrive
What I need is to a delay to the iterations of Flow - yes Flow, you just received 14 emails, but could you process them every 30 seconds or so? I'm guessing that isn't an option.
So, any suggestions?
Thanks
Slippy
Hi @Anonymous,
You are right about that Flow cannot be delayed for each run.
You could post this idea in the Flow Ideas forum, so it might be considered for future releases.
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas
Sorry but I agree that the error might be caused by the high-speed repetitive file creation, I think the issue need to be resolved from the creation speed side.
Regards,
Mona Li