• Add Document Library Web Part on Page
  • Power Automate icon SharePoint Online icon
  • 0

How to add a Document Library web part on a SharePoint Online page in a Power Automate flow.

This sample adds the web part to a oneColumn section on the page.

URI

Headers

Body

Screenshot with example

Below are a bit more details about the values used in this example. Hopefully that helps in configuring the right body payload.



PropertyValueDetails
hideCommandBarfalseHide library controls
hideSeeAllButtonfalseHide “See full library” button
isDocumentLibrarytrue
searchablePlainTextslistTitle keyKey/value pair for the list Title
selectedListId0179db5c-1400-4b21-9993-ca34e56ad208Guid of the Document Library
selectedListUrl/sites/PowerUsers/Shared Documents
selectedViewId3737ee87-814d-427d-8699-d068462e3544View of library
SiteIdcontoso.sharepoint.com,0b11c57d-ef88-46d7-9743-8e800c507595,af1a15c6-956b-4652-b8f8-869836e4e6eeVariable used in the Site Address
SitePageId0979ee98-33f9-4ade-8f96-cc9effccf89aGuid of the Page which will be updated
webpartHeightKey1Size, in this case Small – about 5 items
WebPartType0f087d7f-520e-42b7-89c0-496aaf979d58aka Button, 13 other supported Web Part types
webRelativeListUrl/Shared Documents
addadocumentlibrarywebpartonpage

Expected response

Will return the details of the updated page.

Copy/paste example

Resources

Update sitePage
Use the Document Library web part
supported Web Part types

webpartHeightKeyDisplay Name
1Small – about 5 items
2Medium – about 15 items
3Large – about 30 items
4Autosize – fit to number of items
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.