How to add an Image 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 |
|---|---|---|
| alignment | Center | |
| fileName | beer.jpg | Name of File |
| fixAspectRatio | false | |
| imageSources | /sites/PowerUsers/Shared%20Documents/beer.jpg | images as key/value pairs in an array referencing the items as well |
| imageSourceType | 2 | |
| imgHeight | 405 | Height of Image |
| imgWidth | 720 | Width of Image |
| isOverlayTextEnabled | true | |
| isOverlayTextVisible | true | |
| overlayText | Cheers, enjoy your beer! | Overlay text |
| SitePageId | 05185da7-b069-434d-9ba7-51d8954bfa07 | 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 |
| uniqueId | ddae1b6b-298b-428c-9b1b-a87ffe986f2f | Id of Image file |
| WebPartType | d1d91016-032f-456d-98a4-721247c305e8 | aka Image, 13 other supported Web Part types |
Expected response
Will return the details of the updated page.
Copy/paste example
Resources
Update sitePageUse the Image web part
supported Web Part types
That’s it, Happy testing!
