To send an HTTP request to list SharePoint libraries in Power Automate, you can follow these steps:
1: Add a "Send an HTTP request to SharePoint" action to your flow.
2: In the "Site Address" field, enter the URL of the SharePoint site you want to query.
3: In the "Method" field, select "GET".
4: In the "Uri" field, enter the endpoint for the SharePoint REST API to list libraries, which is /_api/web/lists?$filter=BaseTemplate eq 101 (this will list only document libraries).
5: Under "Headers," add a new entry with the name "Accept" and the value "application/json;odata=nometadata".
6: Save and run your flow.
Here's an example of what the "Send an HTTP request to SharePoint" action might look like:
Site Address: https://<your-sharepoint-site>.sharepoint.com
Method: GET
Uri: /_api/web/lists?$filter=BaseTemplate eq 101
Headers:
Accept: application/json;odata=nometadata
Note:
This should return a JSON array of all document libraries in the SharePoint site.
Comments
Post a Comment