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!
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.
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
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
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492