HI All,
I keep getting Error 504 - Gateway timeout or Bad gateway. It doesn't happen the same step every time but it is always on the excel actions.


The users will be visiting sites and reporting issues that they find (one issue per form submission). This should then update various excel tables all in the same workbook.
Tables
Responses - This contains a list of all the planned visits. Each submission will update the completion time and the user's email address.
Required - This contains a list of issues that the helpdesk needs to log tickets for. Each has a unique identifier generated by the flow (Vendor_Quarter_issue number)
Resolved - A list of issues the user has resolved during their visit or has advised the site to report to another vendor.

The condition checks the form responses to a question asking if the issue was resolved or reported to another vendor.
If yes :
There is a second condition based on the same form question that adds a row to the "resolved" table using the form responses. If the condition is not met the output is identical except for one manually typed entry.
If No:
There is a second condition based on the same form question. If the condition is met then a row is added to the "required" table using a combination of the form responses and the variables that were created earlier in the flow. If it is not met then no further action is taken as only the "responses" table needs to be updated and it gets updated earlier in the flow.
To try and resolve this issue I have:
- Added the variables to remove unnecessary "apply to each" actions.
- Reset my O365 password.
- Deleted all Excel connectors and recreated them.
- Reduced the size of the excel file down to 556kb
- Reduced the amount of "list rows in a table" functions from 4 to 1
- Reduced the amount of "update a row" actions from 4 to 1
- Deleted all of the excel actions and recreated them.
This flow worked during a pilot on 14/4/2022, a user-submitted 15 responses and all of them were processed correctly. The flow stopped working sometime between 14/4/2022 and 26/4/2022 despite no changes being made.
Despite the flow previously working I have followed every suggestion I can find to streamline and optimise the flow to no avail.
Does anyone have a different diagnosis or further suggestions to simplify this flow?