Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created January 28, 2026 11:01
Show Gist options
  • Select an option

  • Save expiscornovus/f1449fc7c4fd1fafca49cf2c35ccc056 to your computer and use it in GitHub Desktop.

Select an option

Save expiscornovus/f1449fc7c4fd1fafca49cf2c35ccc056 to your computer and use it in GitHub Desktop.
Add Link Preview Web Part on Page
{"id":"f4c8a2e6-0ec4-408a-9ede-ff17b7ce97a7","brandColor":"#474747","connectionReferences":{"shared_sharepointonline_1":{"connection":{"id":"/exp_sharedsharepointonline_1c1d3"}}},"connectorDisplayName":"SharePoint","icon":"https://conn-afd-prod-endpoint-bmc9bqahasf3grgk.b01.azurefd.net/v1.0.1769/1.0.1769.4352/sharepointonline/icon.png","isTrigger":false,"operationName":"Send_an_HTTP_request_to_SharePoint","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline_1","operationId":"HttpRequest","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"@parameters('SPOSiteCollection_PowerUsers (exp_SPOSiteCollection_PowerUsers)')","parameters/method":"PATCH","parameters/uri":"_api/v2.0/sites('@{variables('SiteId')}')/pages/@{variables('SitePageId')}/oneDrive.page","parameters/headers":{"Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose"},"parameters/body":"{\n \"@odata.type\": \"#microsoft.graph.sitePage\",\n \"title\": \"Add Link Preview Web Part on Page\",\n \"canvasLayout\": {\n \"horizontalSections\": [\n {\n \"layout\": \"oneColumn\",\n \"id\": \"1\",\n \"emphasis\": \"none\",\n \"columns\": [\n {\n \"id\": \"1\",\n \"webparts\": [\n {\n \"id\": \"@{guid()}\",\n \"webPartType\": \"6410b3b6-d440-4663-8744-378976dc041e\",\n \"data\": {\n \"dataVersion\": \"1.1\",\n \"description\": \"Add a link with a rich preview such as an image or text brought in from the linked video or web content.\",\n \"title\": \"Link\",\n \"properties\": {\n \"linkPreviewComponentMode\": 2,\n \"displayLink\": false,\n \"minimumLayoutWidth\": 2,\n \"cachedMetaDataUpdateTimeStamp@odata.type\": \"#Int64\",\n \"cachedMetaDataUpdateTimeStamp\": 1769596357497,\n \"listId\": \"\",\n \"webId\": \"\",\n \"uniqueId\": \"\",\n \"siteId\": \"\",\n \"openInNewTab\": true\n },\n \"serverProcessedContent\": {\n \"htmlStrings\": [],\n \"searchablePlainTexts\": [\n {\n \"key\": \"title\",\n \"value\": \"Expiscornovus – Discover the new\"\n },\n {\n \"key\": \"description\",\n \"value\": \"Example of a blog with Power Automate cloud flow examples.\"\n }\n ],\n \"links\": [\n {\n \"key\": \"url\",\n \"value\": \"https://www.expiscornovus.com/\"\n }\n ],\n \"imageSources\": [\n {\n \"key\": \"imageURL\",\n \"value\": \"https://live.staticflickr.com/65535/55053618908_f6ecd6db19_c.jpg\"\n }\n ]\n }\n }\n }\n ]\n }\n ]\n }\n]\n}\n}"},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{"Initialize_variable_-_SitePageId":["Succeeded"]},"metadata":{"operationMetadataId":"e006a3a0-8d74-4c66-867c-8c3b7fa1b3c9"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment