Robotic Process Automation (RPA)

 View Only
Expand all | Collapse all

'Download Email Attachments' gives error

  • 1.  'Download Email Attachments' gives error

    Posted Tue May 16, 2023 03:08 PM

    The scenario is this:

    * I have version 23.0.4 of the plattform (and running script in studio)
    * This is the first time I'm trying out this activity
    * I use 'Connect to Outlook dekstop application'
    * I have outlook installed and setup and everything
    * I can read the email i'm trying to download attachments from and get subject etc so that works fine
    * I have specified the 'message' variable and a download folder for this activity

    When using this activity I get the following error:

    System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Redemption.IRDOMail'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D85047E0-7767-4D48-86B6-28BDB5728ABB}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
       at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
       at Redemption.IRDOMail.get_Attachments()
       at WDG.Automation.Base.OutlookMailMessage.DownloadAttachments(String fileMask, String outputPath, Boolean listInlineAttachments, CancellationToken cancellation)
       at WDG.Automation.Base.GetAttachmentCommand.<Execute>d__13.MoveNext()



    ------------------------------
    David Fredriksson
    ------------------------------


  • 2.  RE: 'Download Email Attachments' gives error

    Posted Fri May 19, 2023 02:22 AM

    Hi David,

    I have not seen this error before, but I thought you may check the attached wal file and cross check it with your script. This script download the attachment from the most recent email (that has an attachment) to your desktop.

    Please make sure to change the emailAccount variable to your email, and the Outlook Desktop application should be open and logged in before running the script.



    ------------------------------
    Cheers,
    JENNY KHUC
    ------------------------------



  • 3.  RE: 'Download Email Attachments' gives error

    Posted Mon May 22, 2023 09:34 AM

    Hi Jenny,

    Thank you for helping out! I can't see any attachments to your answer? Please try and upload it again.

    Regards
    David



    ------------------------------
    David Fredriksson
    ------------------------------



  • 4.  RE: 'Download Email Attachments' gives error

    Posted Mon May 22, 2023 09:49 AM
      |   view attached

    Hi David,

    Oh I'm sorry. I realise wal file is not supported so the upload failed. I hope this zip one works.



    ------------------------------
    Cheers,
    JENNY KHUC
    ------------------------------

    Attachment(s)

    zip
    emaildownloadoutook.zip   757 B 1 version


  • 5.  RE: 'Download Email Attachments' gives error

    Posted Mon May 22, 2023 11:51 AM

    File downloaded and script is tested now with the result that both our scripts actually work...(?) I tested yours first and then mine and it didn't throw any error. In between my first post and now, I have upgraded to 23.0.5 and did a reboot of my machine. Perhaps that solved it.

    Thanks anyway! :)



    ------------------------------
    David Fredriksson
    ------------------------------



  • 6.  RE: 'Download Email Attachments' gives error

    Posted Thu May 25, 2023 05:34 AM

    I think I have found what's causing the error. It's when stepping through the script this appears. If you run the script (still in studio) without any breakpoints the activity works fine.

    Something for the platform developers to look at...



    ------------------------------
    David Fredriksson
    ------------------------------



  • 7.  RE: 'Download Email Attachments' gives error

    Posted Thu May 25, 2023 05:56 AM

    Same thinkg goes for activity "Reply Email".



    ------------------------------
    David Fredriksson
    ------------------------------



  • 8.  RE: 'Download Email Attachments' gives error

    Posted Fri May 26, 2023 10:21 AM
    Hello David, 

    Is there a specific reason why you are using the "outlookConnect" command?
    Because using the Connector, to integrate directly with the server is much more performant and stable. 
     
    If you want to test it is very simple, here are the configuration steps
    - Create the connection in the Control Center of type "Microsoft Outlook Email".

    - Use the microsoftMailConnect command in the script

    Regards


    ------------------------------
    Angelo Alves
    IBM RPA Technical Specialist
    ------------------------------



  • 9.  RE: 'Download Email Attachments' gives error

    Posted Fri May 26, 2023 10:35 AM

    Hi!

    When we started setting up mail about a year ago, this was the only solution that worked with office365 accounts and had support for all activities we needed.

    //David



    ------------------------------
    David Fredriksson
    ------------------------------



  • 10.  RE: 'Download Email Attachments' gives error

    Posted Fri May 26, 2023 10:45 AM

    I got it, this feature came out late last year.



    ------------------------------
    Angelo Alves
    IBM RPA Technical Specialist
    ------------------------------