I’m trying to build a pretty simple automation with Maestro where an incoming email triggers the flow. I grab the attachment from the email and pass it to an RPA bot that uses DU to extract the content.
The issue I’m running into is that I can’t get the RPA to receive the file as an input argument. According to the docs, Maestro handles the file as a Job Attachment, so setting the RPA input argument to IResource should do the trick, but it’s failing with the following error before the process even starts: Invalid format for argument ‘in_ResourceArchivoAProcesar’: Could not create an instance of type UiPath.Platform.ResourceHandling.IResource. Type is an interface or abstract class and cannot be instantiated. Path ‘ID’, line 1, position 6.
The issue happens because IResource is an interface , and Maestro is trying to deserialize the input argument directly without knowing which concrete resource type to instantiate. As a result, the job fails before the process starts.
Recommended Solution
Instead of passing the attachment directly as an IResource input argument, try one of these approaches:
Option 1 (Recommended): Pass the file path/string
In Maestro, save/download the email attachment first.
Pass the local file path or storage path to the RPA as a String argument.
Inside the process, use:
Load Resource
or DU activities directly from the file path.
This is currently the most stable approach.
Option 2: Use concrete resource types
If you want to use resources directly, avoid generic IResource arguments and use a concrete implementation supported by the activity/package version (for example Storage Bucket resources). Some Maestro versions currently do not correctly instantiate generic IResource arguments from Job Attachments.
Additional checks
Ensure Studio, Robot, and Maestro versions are compatible.
Update UiPath.System.Activities and DU packages to latest stable versions.
Republish the process after changing argument types.
At the moment, this looks more like a serialization/deserialization limitation with Maestro Job Attachments rather than an issue with DU itself.
Hi @Slobodan_Stjepovic - my hypothesis is that you’re running an older version of robot, or the process doesn’t use the latest UiPath.System.Activities - could you double check this?
Can you share a snapshot of the RPA flow along with the arguments configuration?
Your RPA flow should contain the Download/Save Attachment activity, which generates the output in a file variable type. That variable needs to be converted into an Out argument so the file can be passed to the next workflow.
In the DU flow, you should create an In argument of file type. Then, while configuring the workflow in Maestro, you can map/select the file variable from the previous flow to the DU flow input argument.