{ "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "For_each": { "actions": { "Condition": { "actions": { "Create_blob_(V2)": { "inputs": { "body": "@body('Get_file_content')", "headers": { "ReadFileMetadataFromServer": true }, "host": { "connection": { "name": "@parameters('$connections')['azureblob_1']['connectionId']" } }, "method": "post", "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/files", "queries": { "folderPath": "/output", "name": "@items('For_each')?['{FullPath}']", "queryParametersSingleEncoded": true } }, "runAfter": { "Get_file_content": [ "Succeeded" ] }, "runtimeConfiguration": { "contentTransfer": { "transferMode": "Chunked" } }, "type": "ApiConnection" }, "Get_file_content": { "inputs": { "host": { "connection": { "name": "@parameters('$connections')['sharepointonline']['connectionId']" } }, "method": "get", "path": "/datasets/@{encodeURIComponent(encodeURIComponent('yoursharepointURL'))}/files/@{encodeURIComponent(items('For_each')?['{Identifier}'])}/content", "queries": { "inferContentType": true } }, "runAfter": {}, "type": "ApiConnection" } }, "expression": { "and": [ { "not": { "equals": [ "@items('For_each')?['{IsFolder}']", true ] } } ] }, "runAfter": {}, "type": "If" } }, "foreach": "@body('Get_files_(properties_only)')?['value']", "runAfter": { "Get_files_(properties_only)": [ "Succeeded" ] }, "type": "Foreach" }, "Get_files_(properties_only)": { "inputs": { "host": { "connection": { "name": "@parameters('$connections')['sharepointonline']['connectionId']" } }, "method": "get", "path": "/datasets/@{encodeURIComponent(encodeURIComponent('yoursharepointURL'))}/tables/@{encodeURIComponent(encodeURIComponent('428d88e4-22a3-4ab1-9cc7-0abd79c95be9'))}/getfileitems" }, "runAfter": {}, "type": "ApiConnection" } }, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": { "$connections": { "defaultValue": {}, "type": "Object" } }, "triggers": { "manual": { "inputs": {}, "kind": "Http", "type": "Request" } } }, "parameters": { "$connections": { "value": { "azureblob_1": { "connectionId": "yourconnectionID", "connectionName": "azureblob-1", "id": "yourID" }, "sharepointonline": { "connectionId": "yourconnectionID", "connectionName": "sharepointonline", "id": "yourID" } } } } }