나는 SharePoint - CreateFile 동작을 통해 디렉토리를 생성 할 수있었습니다. 파일 생성 작업의 부작용을 통해 디렉토리를 만드는 것은 확실히 더러운 해킹입니다 (btw, a comment on MS suggestion site에서 영감을 얻음). 이 버그/기능은 문서화되지 않았으므로 프로덕션 환경에서이 버그/기능을 사용하는 것은 좋지 않습니다.
내 문제로 인해 파일을 저장하지 않고 SharePoint에서 디렉토리를 만들어야하는 경우 App Logic의 추가 단계를 사용해야합니다. Create File
조치로 제공되는 Id
을 사용하여 파일을 삭제하십시오.
다음은TestTarget
문서 라이브러리를 기존 에서 folderCreatedAsSideEffect
라는 디렉토리를 만들려고 한 경우 JSON 결과는 아래와 같이됩니다.
"actions": {
"Create_file": {
"inputs": {
"body": "@triggerBody()?['Name']",
"host": { "connection": { "name": "@parameters('$connections')['sharepointonline']['connectionId']" } },
"method": "post",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://MY.sharepoint.com/LogicApps/'))}/files",
"queries": {
"folderPath": "/TestTarget/folderCreatedAsSideEffect",
"name": "placeholder"
}
},
"runAfter": {},
"type": "ApiConnection"
},
"Delete_file": {
"inputs": {
"host": { "connection": { "name": "@parameters('$connections')['sharepointonline']['connectionId']" } },
"method": "delete",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://MY.sharepoint/LogicApps/'))}/files/@{encodeURIComponent(body('Create_file')?['Id'])}"
},
"runAfter": {
"Create_file": [
"Succeeded"
]
},
"type": "ApiConnection"
}
},
대신 사용할 수있는 REST API에 대해 설명합니다. https://docs.microsoft.com/en-us/sharepoint/dev/apis/rest/working-with-folders-and-files-with-rest –