Hi @Anonymous
Welcome to Microsoft Q&A! Thanks for posting the question.
In your scenario, once the file is uploaded successfully to your SFTP server. You can now use the Create Blob to create the blob in the archive container of the storage account and Delete Blob to delete the file from your sftpblob container.
Updated:
I haven't added the Create File action to copy the blob content to SFTP server. In the third action, I am copying the blob content to my archive folder and in the last action, I am deleting the file from my original container (input). The below is just for reference and you can modify it according to your business requirement.
For your reference adding only the action code view
"actions": {
"Create_blob": {
"inputs": {
"body": "@body('Get_blob_content_using_path')",
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/files",
"queries": {
"folderPath": "/archive",
"name": "@triggerBody()?['Path']",
"queryParametersSingleEncoded": true
}
},
"runAfter": {
"Get_blob_content_using_path": [
"Succeeded"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "ApiConnection"
},
"Delete_blob": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "delete",
"path": "/datasets/default/files/@{encodeURIComponent(encodeURIComponent(triggerBody()?['Path']))}"
},
"runAfter": {
"Create_blob": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Get_blob_content_using_path": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/datasets/default/GetFileContentByPath",
"queries": {
"inferContentType": true,
"path": "@triggerBody()?['Path']",
"queryParametersSingleEncoded": true
}
},
"runAfter": {},
"type": "ApiConnection"
}
},
Feel free to reach out to me if you need any assistance.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.