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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Bad Gateway Excel Script
Power Automate
Unanswered

Bad Gateway Excel Script

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a Power Automate Flow where I would like to take the details from a SharePoint list and have some of them populate into an Excel file that is copied into a folder on the same SharePoint. I have seen videos of people doing this and have followed along. However, I keep getting a Bad Gateway error and cannot figure out why. Some of the code has a "null" next to it which I assumed might be the problem. However, every data field has an entry so nothing should be empty. Below is my Excel Script Code, flow, and error. Is there a way to fix this? Again, I have seen many others accomplish this task so I know it is possible. Just need some expertise. Thanks!

 

"error": {
    "code": 502,
    "source": "flow-apim-msmanaged-na-centralus-01.azure-apim.net",
    "clientRequestId": "b53bc385-3a44-483f-935e-93cc4e48d282",
    "message": "BadGateway",
    "innerError": {
      "message": "We were unable to run the script. Please try again.\r\nclientRequestId: b53bc385-3a44-483f-935e-93cc4e48d282",
      "logs": null
 
Bade Gateway.pngScript Code.png
Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @bmorley2010 ,

     

    Please try:

    vbofengmsft_0-1702518929259.png

    function main(workbook: ExcelScript.Workbook, Name: string | undefined, Manage: string | undefined ) {
     let sheet1=workbook.getWorksheet("Sheet1");
     sheet1.getRange("B3").setValue(Name);
     sheet1.getRange("B4").setValue(Manage);
    }

     

    Best Regards,

    Bof

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard