Hi
I have a flow set up which triggers on a form submission. The flow contains an office script that runs on my OneDrive.
I am having an issue getting the script to run 100% of the time that the form is submitted. The script will only run ~50% of the time. When it fails I get the following error message in the 'Run Script' logs.
Solved! Go to Solution.
I'm not sure if this has fixed the issue, or just a coincidence.
I added a 15s delay into the flow after the spreadsheet has been updated, but before the script is run, this seems to have fixed the issue, and I have not encountered anymore errors.
Edit: More information on the flow and what it does in case it's relevant.
The form submits information to 2 spreadsheets. 1 is a a shared spreadsheet and receives all the information from the submitted form, the other is a spreadsheet only I have access to and only receives the submitters email and submission time.
The office script runs on the second spreadsheet, and will compare the current and previous submissions. If the submission time is >20 mins or the submitters emails are different, the script will return a value to the workflow. Whereby if the returned value matches a condition an email will be sent.
(Form submission > submission to spreadsheet 1 > submission to spreadsheet 2 > Office script > Condition > End flow)
I'm not sure if this has fixed the issue, or just a coincidence.
I added a 15s delay into the flow after the spreadsheet has been updated, but before the script is run, this seems to have fixed the issue, and I have not encountered anymore errors.
@LP8821 - Glad to hear the delay workaround fixed the issue for you.
As far as I know, Excel Online uses a concept called "co-authoring" when there are multiple clients (in your case, Forms being one, and Office Scripts being another) working on the same workbook. Any participating co-authoring client won't directly make changes to the master workbook but to a local workbook session and the changes will periodically be synced back to the master workbook stored on OneDrive (or SharePoint). Later the changes will be propagated to other co-authoring clients of the same workbook so they can see these changes.
In your case, I guess there might be a timing issue. It appears when Office Script kicks in, the changes made by the Form submission hasn't been synced to the master workbook yet. So adding some delays could help.
BTW, since the "Get response details" action of the Forms connector can reliably retrieve the data of the current form submission that triggers the flow, I'm wondering if you would be able to directly use that data to compare with the previous data in the workbook. Just something for you to consider...
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
69 | |
24 | |
18 | |
16 | |
13 |
User | Count |
---|---|
133 | |
43 | |
32 | |
32 | |
28 |