External library in Robot Framework to read and parse outlook storage files

103 views
Skip to first unread message

Mahathi Srinivasan

unread,
Apr 29, 2021, 3:34:26 AM4/29/21
to robotframe...@googlegroups.com
Hi,
Is there an external library supported by robot framework, that can read and parse contents of pst/ost outlook files? I am trying to automate retrieval of email info from pst/ost files.

Thanks,
Mahathi



Dave Amies

unread,
May 1, 2021, 8:20:23 PM5/1/21
to robotframework-users
Hi Mahathi,

Unlikely to be a robotframework library for this as it's not something people would do often.

One of the really powerful features of robotframework is the ability to create your own keywords that are actually python functions, so you can use any python library in your custom keyword that does what ever you want it to.

So, putting "python outlook pst" into your favorite search engine (duckduckgo for me) turned up this (https://stackoverflow.com/questions/3197388/outlook-pst-file-parsing-in-python#19123537), so there seems to be a python library that can handle outlook pst files called pypff.

Using that info I would suggest creating 2 keywords:
1) "open pst file" - pass this keyword the pst file you want to open, returns a pst object
2) "get email accounts" - pass this the pst object, and it should return a list or dictionary of the email accounts

From there you can use standard robotframework keywords to do what you need with the account information.

Also if you need to retrieve other information from the pst file, you already have the keyword to open the file, so it should be easy enough to create additional keywords for different actions.

Hope this helps you get started and good luck,

Dave.
Reply all
Reply to author
Forward
0 new messages