When the logic app creates a file using HTTP action PUT method on Azure Blob Storage, the file cannot be read as it appears as corrupted when trying to open the file.
The main reason for this is that in order to avoid problems with special characters, Logic app uses Base64 encoding to encode files while processing, as a result the created files are Base64 encoded and in order for the files to be created correctly to Azure Blob Storage, it needs to be converted to binary.
For example, the following line of text:
Test 1234 as Base64!
would instead appear as:
VGVzdCAxMjM0IGFzIEJhc2U2NCE
To resolve this, use base64toBinary() function when creating files on Azure Blob Storage, so we apply this function to the file content passed in the body field of the HTTP action.
You will need to switch to code view to apply this function manually, final HTTP body should look like the following: