I'm working in Azure Logic Apps and I'm trying to dynamically update a blob in Azure Blob Storage using Azure Logic Apps workflow action named 'Update Blob (V2)'. My goal is to write an integer value to a blob in a container. The blob name is based on a customer name retrieved during a For each loop. I am using 'Customer one' as an example name. When I use a customer name with just one word (e.g., Corp.json), it's works perfectly fine. But as soon as I want to dynamically fill in a customer name with spaces, it gives error.
When I hardcode the blob name (e.g., Customer one.json), it works fine and updates the blob correctly. However, when I fill in the blob name dynamically like this:
encodeUriComponent(concat(trim(string(items('For_each')?['customerName'])), '.json'))
I consistently get the following error:
"body": {
"status": 404,
"message": "Specified blob Customer one.json does not exist.\r\nclientRequestId: 11111111-1111-1111-1111-11111111111",
"error": {
"message": "Specified blob Customer one.json does not exist."
},
"source": "azureblob-we.azconn-we-223.p.azurewebsites.net"
}
What I've already tried:
- Wrapping the customer name with string() and trim() to prevent datatype or whitespace issues
- Using encodeUriComponent() to handle spaces
- Confirmed that the blob exists and can be updated. I did update the blob using hardcoded changes
- Verified that the blob is in the correct container and directory
- Used the Compose action to print the final blob name (= identical)
Additional Info:
- The blob names do include spaces, like "Van Der Dadels.json".
- The blob is confirmed to exist and be accessible.
- Logic Apps is using the "Update blob" action.
- Container access level is private, but credentials and connection are configured correctly.


item()expression?"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('https://temp.blob.core.windows.net/'))}/files/@{encodeURIComponent(encodeURIComponent('/name-of-container-I-am-using/',concat(trim(string(items('For_each')?['customerName'])), '.json')))}Let me know if this is not the right info please ;)