How to get emails from inbox folder in a shared mailbox using robot's account

We create an account for the robot and want to use the account to get emails from the inbox folder in a shared mailbox named “sharedmailbox” using GetOutlookMailMessages activity.

How to access the inbox folder using GetOutlookMailMessages activity? I tried solutions posted on the forum. They are not working. need help.

sharedmailbox1 sharedmailbox

If the outlook installed on the pc has more than one account configured, then you need to put there the email account you want to read, if it is only one or the default, that can be empty…

I already tried this way and it is not working. I got an error message " The specified folder does not exist".

sharedmailbox2

Account property will usually take in as string and it should be in a format like ”xyz@abc.com” that too if that inbox folder is from another specific account
Or as @bcorrea said leave it empty

Cheers @yili1

Hi @yili1… Were you able to resolve this issue? I’m exactly facing the same issue as you reported.

It’s working for me now. It seems to be a bug (also reported in other forums) for the “Get Outlook Mail Message” activity. Here are the parameters I used to access a shared mailbox and retrieve emails from a particular sender.

Here is the catch: You need to enter the below parameters in the Expression Editor (you now the button with 3 dots image . Its a strange but a working theory and like I said its a known bug reported in the other forums.

Here are the fields i used to enter the values in the corresponding ‘Expression Editor’:

1. Input: I entered the shared email box name as shows in my outlook. [Eg. it showed “Test Shared Mailbox”, I entered as-is.

2. MailFolder: My requirement is to search for emails in Inbox folder. Hence, I gave “Inbox” in the MaiFolder parameter.

3. Filter: Ther are many answers provided in various forums. Since my requirement is to drill down the email filter to a particular sender, I provided the sender name as shown in the email. [Eg: I picked up an email from the sender and copied the name (not the email address) to the Filter parameter. Therefore, it goes like "[From]=‘Test Admin’].

7 Likes

Hello,

I can confirm the solution proposed by @email2vjanand is a correct solution to reading/interacting with Outlook Shared Mailbox mail messages using the “Get Outlook Mail Messages” in the “UiPath.Mail.Activities” Package. This is either a very odd bug or a poorly documented activity (maybe both.)

Important “Get Outlook Mail Messages” Properties:

  • Account [Input]: Enter the Display Name of the Shared Mailbox (as it appears in the Folder Pane.) For Example, “Shared Mailbox”, “Invoice Shared Mailbox”, “Company Y Email”, etc…
    Alternatively, you can get the display name by right-clicking on the shared mailbox, selecting “Data File Properties…”, and the name is at the top, right underneath the “General” Tab.

  • MailFolder [Input]: Enter the Folder Path of the folder from the mail messages are to be retrieved. For Example, “Inbox\Subfolder Name 1\Subfolder Name 2”, “Inbox\Invoices”, etc…

System Info:

  • Microsoft Outlook 2013 (Microsoft Exchange)
  • UiPath Studio 2019.10.1 Enterprise Edition
  • UiPath.Mail.Activities v1.9.3 Activity Package

Additionally, I noticed when I created a new folder within the Shared Mailbox Inbox and moved a mail message into the sub folder, I received the error “The specified folder does not exist.” This issue went away after I restarted Outlook.

9 Likes

Hi @samuel.piedra, what if I want to read other people’s email instead of a share folder? I’ve got her credential saved.
Thanks!

I had the same issue. In order to overcome it, I performed the steps below.

  1. Removed the shared mailbox from my profile.
  2. Added the account of the shared mailbox instead.
  3. The account name of the shared mailbox goes in the “Account” parameter of the ‘Get Outlook Mail Messages’ activity.
  4. The folder path is whatever you want it to be of that account such as “Inbox\MyFolder”
  5. Be careful with the account name because it is case sensitive. It needs to be exactly what it is in ‘Data File Properties’. Right click the account and click ‘Data File Properties’ to see what it is listed as.
  6. As an example, I had to change my email address from ‘sampleemail@mycompany.com’ to ‘SampleEmail@mycompany.com’ before the activity started working.

After the account of the shared mailbox was added to my Outlook profile instead of adding the shared mailbox, the activity started working consistently.

A drawback of this is that you need the password for the shared mailbox in order to add the account to your outlook profile.

It ended up working out well for me though because our server has a version of windows that does not continually prompt you for the user name and password of the shared mailbox account. I just had to enter it once and it doesn’t prompt me again, so far.

1 Like

@email2vjanand thank you very much. it worked. struggling from past 2 hours to get it. Thank you very much

1 Like

Can you please share the screen shots of how you removed the shared mailbox from the profile and added the account of shared mailbox instead.

I am facing similar issues.

Thanks

Spent on this 3 hours today. Thank you so much…