How to add a Document Embed 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.
| Property | Value | Details |
|---|---|---|
| file | https://contoso.sharepoint.com/sites/PowerUsers/Shared%20Documents/Example%20Presentations/Demo%20Presentation%20Teams.pptx | Link to file |
| links | /sites/PowerUsers/Shared%20Documents/Example%20Presentations/Demo%20Presentation%20Teams.pptx | links as key/value pairs in an array referencing the file as well |
| SitePageId | 8b2369a2-ae08-42fb-ad6f-74759b3a18c7 | Guid of the Page which will be updated |
| SiteId | contoso.sharepoint.com,0b11c57d-ef88-46d7-9743-8e800c507595,af1a15c6-956b-4652-b8f8-869836e4e6ee | Variable used in the Site Address |
| startPage | 4 | |
| uniqueId | b3e0b18a-d447-4d95-8881-5b97eef0763b | Id of PowerPoint file |
| WebPartType | b7dd04e1-19ce-4b24-9132-b60a1c2b910d | aka Document Embed, 13 other supported Web Part types |
Expected response
Will return the details of the updated page.
Copy/paste example
Resources
Update sitePageUse the File and Media web part
supported Web Part types
That’s it, Happy testing!
