Uploading Files to UiPath Storage Buckets

I recently started playing with integrating UiPath Apps, UiPath Data Services and UiPath Storage Buckets into my automations. It has been a tremendous amount of fun to see it all come together and how it all gels together.
One of my biggest frustrations, however, was getting my file uploads to the storage buckets to work. I kept getting a “403 Forbidden” error regardless of how many times I changed my properties. After trolling through the forums, I found that it is an access issue. My user on orchestrator did not have any storage bucket permissions assigned to it. I wrote this post which explains how to create a new storage bucket role and assign it to a user.
Once the permissions and access have been sorted, we can get to uploading a file to storage buckets and here’s how.
Create the Storage Bucket in UiPath Orchestrator
Remember, storage buckets are folder based, so you’ll need to navigate to the appropriate Folder that you’d like to create the storage bucket in before navigating to Storage Buckets and clicking Add storage bucket:

You have an option to create a storage bucket on orchestrator (the option I’m going with for this example), connect to Azure or AWS. Provide your storage bucket information and click Add:

Upload Files From UiPath Studio
Now navigate to UiPath Studio where you can create a new process or library to store the file upload. If this is a function you’ll use often, across automations, consider creating a library.
Don’t forget to work through the UiPath docs as well, it has some really useful info about what each of the properties represents or expects.
This is literally all you need to configure:

Common Issues
403 Forbidden
This is the one that caught me. It is a permissions issue rather than a problem with the activity’s properties:
- Check that the user (or robot) running the process has a role with storage bucket permissions assigned to it.
- Make sure that role is assigned in the same Folder that the storage bucket lives in.
- Double check that the folder path configured on the activity points to the folder containing the bucket.
File not found
If the local file can’t be found, validate the path before uploading (for example, with a ‘Path Exists’ check) and be careful with relative versus absolute paths, especially when the process runs on a different machine to the one you developed on.
Bucket not found
Storage buckets are folder based, so a bucket created in one folder won’t be visible to a process running in another folder unless the folder path is set on the activity.
Tips
- Wrap the upload in a Try Catch and log the error details, so that a failed upload is easy to trace.
- Follow least-privilege access: give the robot only the storage bucket permissions it actually needs.
- If you upload files often across multiple automations, package the upload logic in a library so it can be reused.
Give it a whirl and email me at jacqui.jm77@gmail.com if you get stuck. This basic template is available on this GitHub repo.