Get Outlook Mail Messages:The specified folder does not exist!

Hello, developers,

I’m dealing with a peculiar problem. The robot for reading and categorizing emails on my computer works without any problem. The problem occurs when converting to a production machine, where the “Get Outlook Mail Messages” activity returns the error message “The specified folder does not exist” even though the folder exists.

I have tried several ways to solve this problem, but none of them worked. I am attaching a list of everything I have tried.

1 - Use the full path to the folder,
2 - Delete the account under which the robot reads mail,
3 - Use the “Outlook” in account name instead,
4 - Using PowerShell I tried to get the folder and its path information, the account and folder is visible, but the robot always reports an error.
The commands are here:

Add-Type -AssemblyName Microsoft.Office.Interop.Outlook
$outlook = New-Object -ComObject Outlook.Application
$namespace = $outlook.GetNamespace(‘MAPI’)
$account = $namespace.Folders.Item(‘mailAcc’)
$account.Folders.Item(‘Inbox’).Name
$account.Folders.Item(‘Inbox’).FolderPath

Does anyone please know what could be the error? I’m really running out of ideas…

Here are the activity properties (I am trying to read folder TEST):
image

Fill out your account (Email address) in the “Get outlook mail message” activity.

@Matej

Try giving the folder like this…I guess your username
Is displayed in your outlook

abc@xyz.com\Inbox

abc@xyz.com/Inbox

Abc@xyz.com is the outlook name that we see as main folder

Try both the slashes

Cheers

Hi @Matej

Have you tried using:
“Inbox\TEST” as your folder name? (or change ‘Inbox’ to the right term for your local language/Outlook)

Best regards
Roman

I already done that and it wasn’t working…

Hi,

I already tried the back slash and the path from PowerShell is also with this, but I can try that.

1 Like

HI @Roman-Routinuum,

the folder is outside Inbox, so I think the path should be without it.

@Matej how many email accounts are configured in Outlook on that PC?

At the first time in the Outlook were 3 accounts, but I changed to only one.

In the Account field can you put in the display name of the email account as it appears in Outlook, instead of the email address?

Does the email account that you want to use appear in the Outlook File → File → Account Settings → Account settings?

Yes, I used the same name as appears in the Account settings.
image

Hi @marian.platonov,

could you please advise me something what I can try?
I would say this is not related to the code of the bot, but morelikely for settings in Outlook or the PC station.

Thanks for your time!