Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created April 19, 2024 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save expiscornovus/93ab3982128c912e78332da6404ef1b8 to your computer and use it in GitHub Desktop.
Save expiscornovus/93ab3982128c912e78332da6404ef1b8 to your computer and use it in GitHub Desktop.
Rename a File
{"id":"6f4a5bbd-e72e-400f-9397-497ba9ca4852","brandColor":"#036C70","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/exp_sharedsharepointonline_e5efa"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/releases/v1.0.1682/1.0.1682.3677/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":"POST","parameters/uri":"_api/web/lists/getbytitle('@{variables('LibraryName')}')/items(@{variables('ItemId')})/validateUpdateListItem","parameters/headers":{"Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose"},"parameters/body":"{\n \"formValues\": [\n {\n \"FieldName\": \"FileLeafRef\",\n \"FieldValue\": \"PowerAutomate.docx\"\n }\n ],\n\"bNewDocumentUpdate\": false\n}"},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{"Initialize_variable_-_ItemId":["Succeeded"]}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment