How to convert String to Storage Account

Hi there,

I am trying to upload a file to Azure Blob. During this process, when I use the activity ‘Get Storage Account Key,’ I encounter a requirement where the input for the Storage Account needs to be a storage account variable.

I am currently confused about how to convert a string to a storage account variable.

Any help would be appreciated. Thanks

Hi @jianan.shi

It should be secure string, I have stored the Account key & account name in the credentials & we can fetch them using get credentials

for upload you can use the Azure upload blob from file

Hope this helps :slight_smile:

Thanks for the reply.
What I’m referring to is the Storage Account within the ‘Get Storage Account Key’ activity. When I created a variable and assign the value for it, an error occurs - 'Compiler error encountered processing expressions: Value of type ‘String’ cannot be converted to ‘UiPath.Azure.Models.StorageAccount.’
I am confused about how to properly convert it to the storage account.
Screenshot 2024-01-23 094352

Hi @jianan.shi

I think for that activity you have to follow this sequence

Add Get Storage Account Activityinside theAzure Scope

  1. Enter Storage Account name, Resource Group Name and create an output variable for Storage Account(Use this output variable in get storage acc key)

  2. Add Get Storage Account Key Activity to retrieve Storage Account Key

Hope this helps :slight_smile: