web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Seeking Assistance: Ad...
Power Automate
Suggested Answer

Seeking Assistance: Add row to Excel Table failing: "Bad Gateway" error 502 or 504 referenced

(0) ShareShare
ReportReport
Posted on by
I have had this simple flow running for the last 2 months seamlessly.  Unsure why, but starting last week, there have been fails and data missing.  As in when a user submits a new FORMS response that information no longer auto populates into an existing Excel Workbook.  Any advise for a non advance/non programmer greatly appreciated!
 
 
  "error": {
    "code"504,
    "source""flow-apim-msmanaged-na-centralus-01.azure-apim.net",
    "clientRequestId""936237ea-a0e1-470f-83f2-ec83f39b1b8c",
    "message""BadGateway",
    "innerError": {
      "status"504,
      "message""Request to Graph API has timed out. Error code is 'UnknownError'. Error message is 'Gateway Timeout'.\r\nclientRequestId: 936237ea-a0e1-470f-83f2-ec83f39b1b8c\r\nserviceRequestId: 1b008278-92dd-4d7e-9e29-30ccc33c54c6;bcc6e4fc-41b7-4516-9da1-f9dfb3de9cc5;370c20dc-30d7-44d8-ad0d-82a8cc6cb665;5d520233-6135-4568-add1-9c8cdf6302ae;0a13fd06-f5b7-4f50-be8e-2b7eeda87d39;bae029d8-f0df-40cc-bcb3-84c6d11b8293",
      "error": {
        "message""Request to Graph API has timed out. Error code is 'UnknownError'. Error message is 'Gateway Timeout'."
      },
      "source""excelonline-scus.azconn-scus-001.p.azurewebsites.net"
    }
  }
 
 
Second Error:
{
  "error": {
    "code"502,
    "source""flow-apim-msmanaged-na-centralus-01.azure-apim.net",
    "clientRequestId""3071b03d-f313-4495-9da6-1bb64a285ae0",
    "message""BadGateway",
    "innerError": {
      "status"502,
      "message""Graph API is currently unavailable. Error code is 'UnknownError'. Error message is 'Bad Gateway'.\r\nclientRequestId: 3071b03d-f313-4495-9da6-1bb64a285ae0\r\nserviceRequestId: 5dc71f66-b40f-4e77-91fd-3e616c1bf3cd",
      "error": {
        "message""Graph API is currently unavailable. Error code is 'UnknownError'. Error message is 'Bad Gateway'."
      },
      "source""excelonline-scus.azconn-scus-001.p.azurewebsites.net"
    }
  }
}
BadGateway.png
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    4,267 Super User 2026 Season 2 on at
    First, verify that the Forms trigger is succeeding and that the failure occurs specifically at the Excel action. Then refresh the Excel connection, check the workbook/table, and configure retry handling.

    If you continue getting 502/504 errors even after that, I would treat this as a Microsoft/Excel Online connector or Graph availability issue and check Microsoft 365 service health.

    Also, because you have already lost some submissions, I would review the failed flow runs and manually recover those Forms responses into Excel if necessary. The failed runs should contain the original Forms response data even though the Excel row was never created.
  • Suggested answer
    Syed Aqib Raza Profile Picture
    68 on at

    The error is not indicating a problem with your Forms trigger or the data you are sending. The important part of the error is:

     
     

    Request to Graph API has timed out

     

    Graph API is currently unavailable

     

    504 Gateway Timeout / 502 Bad Gateway

     

    The Excel Online (Business) connector uses Microsoft Graph/API services to access and update the workbook. So this appears to be either a transient Microsoft service issue or a problem accessing/processing the workbook, rather than a Power Automate formula/programming error.

     

    A few things I would check:

     

    1. Check the Excel file itself

     

    Make sure the workbook:

     

    Is stored in SharePoint or OneDrive for Business

    Is not corrupted

    Is not excessively large

    Contains a properly formatted Excel Table

    Does not have unnecessary formulas/calculations that could slow down updates
     

    2. Make sure the workbook is not constantly open or locked

     

    If multiple people have the workbook open and are editing it while the flow is writing rows, this can sometimes cause Excel connector problems.

     

    Try closing the workbook for all users temporarily and test the flow again.

     

    3. Check for multiple simultaneous Form submissions

     

    Excel is not ideal for handling a large number of concurrent writes. If several Forms responses arrive around the same time, multiple Add a row into a table actions may try to update the workbook simultaneously.

     

    If this is happening, consider controlling concurrency so that Excel updates are processed more sequentially.

     

    4. Refresh the Excel connection

     

    Try:

     


    • Going to Power Automate → Connections


    • Checking the Excel Online (Business) connection


    • Re-authenticating or recreating it if necessary


    •  
     

    Then save and republish the flow.

     

    5. Be careful when retrying failed runs

     

    Your screenshot shows:

     
     

    8 retries occurred

     

    Before manually rerunning every failed flow, check the Excel table first. Sometimes the request can actually complete on the backend but Power Automate receives a timeout response. Retrying blindly could potentially create duplicate rows.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard