Hello everyone, i have created a Project using Mastero where i am using One Drive connection to read excel. In this excel i have Outlook foldername where the email should move. If i select foldername directly its working but if i am using variable
(vars.response6?.[0]?.values?.[1]?.[2]), its not working.
if not to get the correct expression show what is the variable and how the values are present
but best one would be to open expression editor and use the inbuilt autopilot to write the expression and chck using debug panel to see if the value is correct
You need to provide a unique reference to move an email. Currently, I don’t see any Get Email activity that would allow you to retrieve the email and pass its reference to the Move Email activity.
Check if you are retrieving the correct Unique Id of the email which you want to move.
If yes, check the expression and even you can click on the icon next to the box and test the expression at design time to validate that expression is valid. Thanks.
@SVa This happens because the value coming from Excel is a string (folder name), while the To email folder field expects the Outlook folder/resource value.
Then use that folder name to find/get the Outlook folder and pass the returned folder ID/resource to the Move Email activity. Passing only the folder name directly to the folder picker will not work dynamically.
Since selecting the folder manually works, the Outlook connection is fine — the issue is the type/value being passed dynamically.
@Jasmin_Bar@Dhruba_Jyoti_Kalita its not working.
Integration Services bad request - (102003)
Request to Integration Services failed with status code ‘400’, message: {“requestId”:“6ab11aa7e4b0844609c35a78”,“providerErrorCode”:400,“message”:“Bad Request”,“providerMessage”:“error - {code=ErrorInvalidIdMalformed, message=Id is malformed.}”}.
As i said if i select the folder manually,its working
Hi @SVa , The dynamic expression is not resolving to a valid folder identifier. Log the output, trim it, and verify whether the activity expects a folder name or folder ID.
@SVa Thanks for sharing the error. ErrorInvalidIdMalformed confirms that the folder name from Excel is being treated as a folder ID, which is why it fails. When you select the folder manually, UiPath passes the actual folder resource.
For a dynamic folder name, in Move Email → To email folder, click the + / input options and select Folder path instead of passing the variable directly to the folder field. UiPath supports Folder path specifically for dynamically specifying the destination folder
Above expression i can give only in Insert Variable option as Folder field is not accepting values - Use FIle/FOlder Browse giving option to select folder
@SVa Thanks for the screenshot. I see the issue now. Insert variable is not the correct option here because the normal To email folder input expects an IResource, even though the JS editor allows you to enter a string.
In the To email folder field, click the + and check for the Folder path option. Select Folder path first, then pass your Excel variable there.
If Folder path is not available in Maestro for this connector activity, then this looks like a limitation of the Maestro connector implementation rather than an issue with your JS expression. In that case, please share the options shown when you click the + beside To email folder.
When you select an email folder from the selection, it stores the folder ID as string,
Try providing the folder name as a string. If that doesn’t work, try using the Get Email Folder activity first, filter the required folder, and then pass the folder ID as a string.
@SVa Thanks, now it is clear. In Maestro, when you use Expression for To email folder, the value is being sent as the Outlook folder ID, not as the folder display name. That is why passing 2026-10 Webinar RSK gives ErrorInvalidIdMalformed. Selecting the folder manually works because UiPath resolves and sends the actual folder resource/ID behind the scenes.
For a dynamic folder, add Get Email Folders List before Move Email, find the folder whose name matches the value coming from Excel, and then pass that folder’s ID to To email folder. UiPath provides Get Email Folders List specifically to retrieve the Outlook folders for the connected account.
So the Excel folder name should be used to find the folder first, rather than being passed directly into Move Email.
here Response9 is folderlist and response 6 is Excel content
{
“code”: “400”,
“message”: “Integration Services bad request”,
“detail”: “Request to Integration Services failed with status code ‘400’, message: {\“requestId\”:\“6ab2696be4b010bf1c3e682e\”,\“providerErrorCode\”:400,\“message\”:\“Bad Request\”,\“providerMessage\”:\“error - {code=BadRequest, message=Invalid filter clause: Could not find a property named ‘undefined’ on type ‘microsoft.graph.mailFolder’., innerError={date=2026-09-22T11:41:31, request-id=6c6606bc-9612-4189-907a-994ffd84dece, client-request-id=6c6606bc-9612-4189-907a-994ffd84dece}}\”}”,
@SVa The issue is with the filter expression. response9 is the output of Get Email Folders List, so you should not use it inside the same activity’s Filter.
The Filter needs to return an OData filter string, not true/false.
For example, if the Excel value is 2026-10 Webinar RSK, the final filter should be:
displayName eq ‘2026-10 Webinar RSK’
Please try this and check what is returned in the MailFolder output. If it still gives a 400 error, share the output/error because the Maestro connector may be handling the Filter field differently.
@Dhruba_Jyoti_Kalita, It’s working . Instead of boolean, now with below expression i am getting foldername.
vars.response9?.[0]?.displayName?.includes(vars.response6?.[0]?.values?.[1]?.[2]) ? vars.response9?.[0]?.displayName : ‘’