{
"id": "f24900bb-a2ac-46a4-99e0-5d42e300b372",
"brandColor": "#8C3900",
"connectionReferences": {
"shared_excelonlinebusiness": {
"connection": {
"id": "/providers/Microsoft.PowerApps/apis/shared_excelonlinebusiness/connections/shared-excelonlinebu-PING-PONG"
}
},
"shared_office365groups_1": {
"connection": {
"id": "/providers/Microsoft.PowerApps/apis/shared_office365groups/connections/shared-office365grou-PING-PONG"
}
},
"shared_sharepointonline-1": {
"connection": {
"id": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-PING-PONG"
}
}
},
"connectorDisplayName": "Control",
"icon": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=",
"isTrigger": false,
"operationName": "Scope_Delete_Worksheets",
"operationDefinition": {
"type": "Scope",
"actions": {
"Filter_array": {
"type": "Query",
"inputs": {
"from": "@outputs('Get_worksheets')?['body/value']",
"where": "@not(equals(toLower(item()?['name']), 'major'))"
},
"runAfter": {
"Get_worksheets": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "236ec8f2-a903-43a3-a099-460109d82100"
}
},
"Get_worksheets": {
"type": "OpenApiConnection",
"inputs": {
"host": {
"connectionName": "shared_excelonlinebusiness",
"operationId": "GetAllWorksheets",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_excelonlinebusiness"
},
"parameters": {
"source": null,
"drive": null,
"file": null
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
},
"runAfter": {},
"metadata": {
"operationMetadataId": "adfefe06-03a6-4c87-b8f1-a3cbae5c954e"
}
},
"ForEverySheet": {
"type": "Foreach",
"foreach": "@body('Filter_array')",
"actions": {
"HTTPS_DELETE_Worksheet": {
"type": "OpenApiConnection",
"inputs": {
"host": {
"connectionName": "shared_sharepointonline-1",
"operationId": "HttpRequest",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
},
"parameters": {
"dataset": "https://graph.microsoft.com/",
"parameters/method": "DELETE",
"parameters/uri": "v1.0/sites/%7B@{split(trim(replace(actions('Get_worksheets')?['inputs/parameters/source'], 'sites/', '')), ',')[1]}%7D/drives/@{actions('Get_worksheets')?['inputs/parameters/drive']}/items/@{actions('Get_worksheets')?['inputs/parameters/file']}/workbook/worksheets(%27@{encodeUriComponent(items('ForEverySheet')?['id'])}%27)",
"parameters/headers": {
"Content-type": "application/json",
"Accept": "application/json"
}
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
},
"runAfter": {},
"metadata": {
"operationMetadataId": "047a8141-43ea-438b-9db8-d25e29b631ee"
}
}
},
"runAfter": {
"Filter_array": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "66d3f384-4323-4236-b40c-3d0ba618e025"
}
}
},
"runAfter": {
"Initialize_FileIdGraphVAR": [
"Succeeded"
],
"Initialize_FolderIdGraphVAR": [
"Succeeded"
],
"Initialize_WorksheetIdVAR": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "1254234f-cd75-4ec6-bf28-8891a1f2b9bb"
}
}
}
|