robocorp / rpaframework

Collection of open-source libraries and tools for Robotic Process Automation (RPA), designed to be used with both Robot Framework and Python
https://www.rpaframework.org/
Apache License 2.0
1.17k stars 226 forks source link

Can't find attachments (empty list) in e-mail with PDF attachment #657

Closed cmin764 closed 2 years ago

cmin764 commented 2 years ago

Robot test

E-mail sent to myself containing one attachment (PDF):

Screenshot 2022-10-07 at 18 25 52

E-mail dictionary:

{'Sender': 'cosmin@robocorp.com', 'To': [{'name': 'Cosmin', 'email': 'cosmin@robocorp.com'}], 'CC': [], 'BCC': [], 'Subject': 'Duplicate attachment', 'Body': 'Duplicate attachment\r\nexchange-oauth2.pdf <https://robocorptechcom-my.sharepoint.com/:b:/g/personal/cosmin_robocorp_com/EYnUd5klCztJhfkf_FJmv1YBBX0UVpfi4Q9FM8YLCtcxZA> \r\n', 'Attachments': [], 'Size': 44152, 'object': <win32com.gen_py.Microsoft Outlook 16.0 Object Library._MailItem instance at 0x2963881199456>, 'ReceivedTime': '2022-10-07T18:00:17.379000+00:00', 'ReceivedTimestamp': 1665154817.0, 'SentOn': '2022-10-07T18:00:14+00:00'}

So it looks it is hosted in SharePoint. Is that the expected behaviour? And if yes, then can we download the file from there and add it into the Attachments field? (if it makes sense to do so)

And the robot obviously fails with (because there's no attachment to download):

Screenshot 2022-10-07 at 18 28 30

Where the same example worked with the very same e-mail data (sent to myself) and e-mail address cosmin@robocorp.com, but this time added as a Google profile. (the example above is with Exchange) -- because with Google the file was attached for real directly inside the e-mail

cmin764 commented 2 years ago

Links are found in the Body; aren't attachments for real.