Get OData type Folder

How to retrieve the OData type of a folder in a SharePoint Online library using a Power Automate flow.

URI

_api/web/GetFolderByServerRelativeUrl('@{variables('Path')}')/ListItemAllFields?$select=type

Headers

{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}

Body

Not applicable

Screenshot with example

getodatatypefolder_example

Copy/paste example

{"id":"21e86293-8fc8-4482-9b0c-d749ed1ca2d9","brandColor":"#036C70","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/exp_sharedsharepointonline_e5efa"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/releases/v1.0.1610-greyhound-localization-RelayFix/1.0.1610.3091/sharepointonline/icon.png","isTrigger":false,"operationName":"Send_an_HTTP_request_to_SharePoint","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"HttpRequest","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"@parameters('SPOSiteCollection_PowerUsers (exp_SPOSiteCollection_PowerUsers)')","parameters/method":"GET","parameters/uri":"_api/web/GetFolderByServerRelativeUrl('@{variables('Path')}')/ListItemAllFields?$select=type","parameters/headers":{"Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose"}},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{"Initialize_variable":["Succeeded"]},"metadata":{"operationMetadataId":"4c6a246c-53b9-4838-8da7-aff0eb2484ba"}}}

Resources

Working with folders by using REST

That’s it, Happy testing!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.