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 / Bad Gateway for On-Dem...
Power Automate
Unanswered

Bad Gateway for On-Demand Document Library Trigger

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I'm trying to build a Flow that is triggered by using the on-demand button in a SharePoint document library as described here: https://flow.microsoft.com/en-us/blog/flow-in-spo-document-libraries/

 

However, I'm getting a "Bad Gateway" error on the "Get Item" step.  Here is the message returned:

{
"status": 502,
"message": "Unknown Error",
"source": "https://<SITEURL>.sharepoint.com/_api/SP.APIHubConnector.GetListItem(listName='<LISTGUID>',itemId='<ITEMID>')",
"errors": [
"-1",
"Microsoft.SharePoint.Client.UnknownError"
]
}

 

I've given this a try on a SharePoint List (not Library) and it seems to work fine.

 

If you have any idea on how to resolve this, I'd very much appreciate it.

Thanks!

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Please share your flow configuration here.

    Generally the SharePoint ->Get Item action would only work for SharePoint list.

    As there is a Item Identifier need to be noticed before use this action.

    When using the SharePoint ->Get items, there is no document Library could be selected from the List Name part, we need to choose Enter custom Value, then enter the Name of the Document Library.

    Doing it in this way should make it work to get the Metadata of the Document Library.

    See my posts in the following thread for more reference:

    Scheduled sending email with a list of files

     

    Regards,

    Michael

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Michael,

     

    Here is the configuration.  I'm using one of the templates which automatically added the "Request" and "Get Item" steps.  From my understanding, this is required to have the Flow appear in the toolbar in the document library (see the screenshot below).  If I change the "Get Item" to "Get Items" or otherwise, the flow will not appear in the document library toolbar.

     

    Here is the Flow Configuration and error:

     

    And here is the Flow that can be launched when selecting a file in the document library:

     

    Thanks

    Naheed

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi - any other ideas?  I've tried many different things, but I keep getting a 'Bad Request' error whenever I try to do a "Get Items" or "Get Item" action.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard