Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created February 24, 2025 14:36
Show Gist options
  • Save expiscornovus/1c1f67f63e23cec146c525511a1cc07e to your computer and use it in GitHub Desktop.
Save expiscornovus/1c1f67f63e23cec146c525511a1cc07e to your computer and use it in GitHub Desktop.
Add Quick Links Web Part on Page
{"id":"37147c34-fc4a-4981-a834-d803c835d5a4","brandColor":"#036C70","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/exp_sharedsharepointonline_e5efa"}}},"connectorDisplayName":"SharePoint","icon":"https://conn-afd-prod-endpoint-bmc9bqahasf3grgk.b01.azurefd.net/releases/v1.0.1723/1.0.1723.3986/sharepointonline/icon.png","isTrigger":false,"operationName":"Send_an_HTTP_request_to_SharePoint","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","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":{"Content-Type":"application/json"},"parameters/body":"{\n \"@odata.type\": \"#microsoft.graph.sitePage\",\n \"title\": \"Example Landing 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\": \"73d07dde-3474-4545-badb-f28ba239e0e1\",\n \"webPartType\": \"c70391ea-0b10-4ee9-b2b4-006d3fcad0cd\",\n \"data\": {\n \"dataVersion\": \"2.4\",\n \"description\": \"Show a collection of links to content such as documents, images, videos, and more in a variety of layouts with options for icons, images, and audience targeting.\",\n \"title\": \"Useful Links\",\n \"properties\": {\n \"[email protected]\": \"#Collection(graph.Json)\",\n \"items\": [\n{\n \"thumbnailType\": 2,\n \"id\": 2,\n \"description\": \"\",\n \"altText\": \"\",\n \"rawPreviewImageMinCanvasWidth\": 32767,\n \"fabricReactIcon\": {\n \"@odata.type\": \"#graph.Json\",\n \"iconName\": \"powerautomatelogo\"\n },\n \"sourceItem\": {\n \"@odata.type\": \"#graph.Json\",\n \"itemType\": 2,\n \"fileExtension\": \"\",\n \"progId\": \"\"\n }\n },\n {\n \"thumbnailType\": 2,\n \"id\": 1,\n \"description\": \"\",\n \"altText\": \"\",\n \"rawPreviewImageMinCanvasWidth\": 32767,\n \"fabricReactIcon\": {\n \"@odata.type\": \"#graph.Json\",\n \"iconName\": \"powerbilogo\"\n },\n \"sourceItem\": {\n \"@odata.type\": \"#graph.Json\",\n \"itemType\": 2,\n \"fileExtension\": \"\",\n \"progId\": \"\"\n }\n }\n],\n \"isMigrated\": true,\n \"layoutId\": \"Waffle\",\n \"shouldShowThumbnail\": true,\n \"isTitleEnabled\": true,\n \"imageWidth\": 100,\n \"hideWebPartWhenEmpty\": true,\n \"dataProviderId\": \"QuickLinks\",\n \"webId\": \"af1a15c6-956b-4652-b8f8-869836e4e6ee\",\n \"siteId\": \"0b11c57d-ef88-46d7-9743-8e800c507595\",\n \"listLayoutOptions\": {\n \"@odata.type\": \"#graph.Json\",\n \"showDescription\": false,\n \"showIcon\": true\n },\n \"buttonLayoutOptions\": {\n \"@odata.type\": \"#graph.Json\",\n \"showDescription\": false,\n \"buttonTreatment\": 2,\n \"iconPositionType\": 2,\n \"textAlignmentVertical\": 2,\n \"textAlignmentHorizontal\": 2,\n \"linesOfText\": 2\n },\n \"waffleLayoutOptions\": {\n \"@odata.type\": \"#graph.Json\",\n \"iconSize\": 1,\n \"onlyShowThumbnail\": false\n }\n },\n \"serverProcessedContent\": {\n \"htmlStrings\": [],\n \"searchablePlainTexts\": [\n {\n \"key\": \"title\",\n \"value\": \"Useful Links\"\n },\n {\n \"key\": \"items[0].title\",\n \"value\": \"Power Automate\"\n },\n {\n \"key\": \"items[1].title\",\n \"value\": \"Power BI\"\n } \n ],\n \"links\": [\n {\n \"key\": \"baseUrl\",\n \"value\": \"/sites/PowerUsers\"\n },\n {\n \"key\": \"items[0].sourceItem.url\",\n \"value\": \"https://make.powerautomate.com\"\n },\n {\n \"key\": \"items[1].sourceItem.url\",\n \"value\": \"https://app.fabric.microsoft.com\"\n } \n ],\n \"imageSources\": []\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":"6a5d2730-1691-4c87-a8a6-b32b67505b90"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment