Unable to Move Email to "Failed" Folder in REF Framework (error: Move Email: The object used in the activity does not exist)

Hi everyone,

I’m working on a UiPath process using the REFramework (REF), where I handle emails from a folder. If processing fails, I need to move the email to a “Failed” folder, but I’m encountering issues with the Move Email activity.

Here’s the flow of my process:

  • In the Process, I move the email to an “In Process” folder for processing and extract its attachments.
  • In the SetTransactionStatus, if a business or system exception occurs, I attempt to move the email from the “In Process” folder to the “Failed” folder.

The issue:
When I try to move the email to the “Failed” folder, the Move Email activity sometimes shows the email as empty or null.
However, when I use the same approach to move the email to the “Success” folder for successful transactions, it works fine.

Additional details:
I’m passing the email object as an argument between states (e.g., from Process to SetTransactionStatus) to ensure the same email is being referenced.
I’ve verified that the “Failed” folder exists and used the correct path in the Move Email activity.
Despite this, the issue persists, and the email does not move to the “Failed” folder. It shows me an error saying the value cannot be null or that is does not exist.

I would appreciate any suggestions or guidance on how to resolve this!

Thanks in advance!

@Slavica_Stojmenova1,

Before you move the mail to a folder, try using Get Email By Id activity to get the email object again and now try to move this newly got email object.

@Slavica_Stojmenova1

it is expected as no arguments are passed out when there is an exception in process.xaml

either use the email object from main.xaml only which you pass into process.xaml and dont pass it out isntead use the same

or get the email again before moving

cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.