How do I to pass files to an RPA from Maestro?

Hello everyone!

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.


Any help would be appreciated!

Hi @Slobodan_Stjepovic,

Change the argument type string to file for argument in_ResourceArchivoAProcesar. Then You can pass the file directly downloaded in previous step.

Thanks

@Slobodan_Stjepovic welcome to community!
Please take a look below documentation,

If you find this helpful, please mark it as solution.
Happy Automation.

Hi @Slobodan_Stjepovic,

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

  1. In Maestro, save/download the email attachment first.
  2. Pass the local file path or storage path to the RPA as a String argument.
  3. 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,

I did and I’m receiving the same error

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?

Hi @Slobodan_Stjepovic,

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.

Thanks

Sure!

Here is the service task that is getting the File as an output variable:

And here is the service task receiving it as an input argument:

Input argument configuration:

Error:

Hi Justin.

I’m using studio web the version of System.Activities is 26.2.6. I doubt it’s a compatibility issue

Hey everyone.

I managed to make it work by changing the Input Argument type from File to JobAttachment