Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created March 11, 2025 14:13
Show Gist options
  • Save expiscornovus/08633d6c0b07cb88ccc34937486c6e26 to your computer and use it in GitHub Desktop.
Save expiscornovus/08633d6c0b07cb88ccc34937486c6e26 to your computer and use it in GitHub Desktop.
Add Divider Web Part on Page
{"id":"f02a489b-d7a5-4d82-9fdb-25914ca23b1e","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.1738/1.0.1738.4131/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":{"Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose"},"parameters/body":"{\n \"@odata.type\": \"#microsoft.graph.sitePage\",\n \"title\": \"Divider Example\",\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\": \"029af543-0be3-3ca7-af88-7d7deeb7d922\",\n \"webPartType\": \"2161a1c6-db61-4731-b97c-3cdb303f7cbb\",\n \"data\": {\n \"dataVersion\": \"1.1\",\n \"description\": \"Add a line to divide areas on your page.\",\n \"title\": \"Divider\",\n \"properties\": {\n \"minimumLayoutWidth\": 1,\n \"length\": 50,\n \"weight\": 4\n },\n \"serverProcessedContent\": {\n \"htmlStrings\": [],\n \"searchablePlainTexts\": [],\n \"links\": [],\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":"a9d3189e-1ed6-436a-bca6-d109d8a2888b"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment