Hi UiPath Community,
I’m currently working on a project using the REFramework, and I’m integrating Microsoft365 Mail Activities to read emails. However, I’m facing a persistent issue when trying to extract values using Regex in a Multi Assign activity.
The Expression:
vb
CopyEdit
Regex.Match(in_TransactionItem.Body.ToString, "(?<=Loan Amount Requested:\s*)\d+").Value
or even:
vb
CopyEdit
Regex.Match(in_TransactionItem.Body.Content.ToString, "(?<=Loan Amount Requested:\s*)\d+").Value
The Issue:
- I get a Validation Error:
vbnet
CopyEdit
BC30652: Reference required to assembly 'System.Net.Mail, Version=6.0.0.0...'
- It seems REFramework is expecting
System.Net.Mail.MailMessage, but myin_TransactionItemis of typeMicrosoft365.MailMessage(CoPilotMessage). - Because of this type mismatch, even though the Regex expression is syntactically correct, the project throws validation errors and doesn’t run.
What I’ve Tried:
- Converting the expression using
.Body.ToString,.Body.Content, etc. - Ensuring Regex pattern is correct.
- Checked that
in_TransactionItemis being passed properly.
What I Need Help With:
- How can I use Microsoft365.MailMessage within REFramework without triggering validation errors?
- Do I need to change the argument types in
Process.xamlandMain.xamlfromSystem.Net.Mail.MailMessagetoMicrosoft365.MailMessage? - Or is there a way to cast or convert the Microsoft365 message into a format compatible with REFramework’s default structure?
I’m seriously stuck at this point, and I’ve already gone through trial and error multiple times. I’d appreciate a clear and tested solution.
