Search code examples
outlookblueprism

Cannot read Outlook Sent Items with Blue Prism Mapiex Get Mail function


I tested reading mail from Sent Items with BP Mapiex Get Mail, but it only works with Inbox (default folder in action). Folder name is correct (I took it as I see it in Outlook).

Error message: Failure in Get Mail function of Blue Prism Extended MAPI Automation. Failed to open sub-folder 'Sent Items'.

Would anyone have any ideas, what can help it work with Sent Items?

Thanks!


Solution

  • This is because Get Mail was configured to look in the Inbox only (and sub folders within the inbox). You can add a rule in Outlook to move the sent items to a sub-folder (then you use the Get Mail action), or add a new page in your MAPIEx object. If you go with the latter, you can proceed like this:

    1. Open the MAPIEx object and duplicate the page called 'Get Mail', rename the page and the code stage to something else, such as Get Sent Items, then publish it. I did it this way:

      enter image description here

    2. Open the code stage and edit this line (line 17) so that it looks like the following, from OpenInbox() to OpenSentItems():

      enter image description here

    Editing the highlighted items is optional but preferable as it makes it easier to debug should there be issues. For instance, you would change anything that says Inbox to Sent Items.

    From there you can call the action from your process just like you would call Get Mail.