web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retrieve Email Message...
Power Automate
Unanswered

Retrieve Email Messages returns weird error

(0) ShareShare
ReportReport
Posted on by

I've only encountered this error three times and each time I'm unsure of what exactly is causing the issue.

 

Here's the specifics: I'm using the Retrieve email messages action to activate my Outlook and target a folder, then download all of the attachments off an email with the "To" field of a certain agency member's email.

 

In my first go around making this Flow, I'm making several personalized versions, it worked just fine when I set up the Retrieve email messages action. I entered an email, I got the message attachments out no problem - no fuss no muss. I duplicated (File > Save As...) my Flow and changed only the "To" parameter in the Retrieve email messages action and it threw the following error:

 

Failed to retrieve message with uid 803

 

I'm too new to PAD and networking to really have any idea what this means. 

 

After a period of monkeying with the Flow I got it to work for the new email I supplied. Again, I had to duplicate this flow so once more, File > Save As... then back to the Retrieve email messages action to change the "To" field criteria. Once again, it threw a variation of the above error message.

 

Today I've done the exact same steps as outline above and I'm still getting this mysterious error, now it reads:

 

Failed to retrieve message with uid 908

 

Error details: Microsoft.Flow.RPA.Desktop.Robin.SDK.ActionException: Failed to retrieve message with uid 908. ---> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0)
at Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.EmailActions.RetrieveEmails(Variant imapServer, Variant username, Variant varPassword, Variant mailFolder, Variant fromContains, Variant toContains, Variant subjectContains, Variant bodyContains, Variant sentSince, Variant sentUpTo, Variant saveAttachmentsInto, Variant& retrievedEmails, Int32 serverPort, Boolean enableSsl, Int32 retrieveOnlyUnread, Boolean saveAttachments, Boolean markAsRead, Boolean acceptUntrustedCertificates)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.RetrieveEmails.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

I'm hesitant to begin postulating what the error specifics mean.

 

Anyone have any idea what to do differently going forward?

I have the same question (0)
  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    When trying to copy a flow using the SaveAs feature. Sometimes (actually every time for me)  things get hung up. So do the following:

    • Open the flow you want to copy
    • Save As the new flow name
    • close the new flow
    • close all PAD windows (typically just the dashboard with your flow, but if you have other flows open, close those too)
    • go to task manager (control + Alt + del)
    • right click -> end task on Power Automate
    • reopen power automate

    this process should reset the hang up. Both flows should be available. And hopefully you won’t have an error on the email action. 

  • Community Power Platform Member Profile Picture
    on at

    Thank you very much, @MichaelAnnis!

     

    Last night, more out of frustration than anything else, I did a full reboot on my computer. Turned it off, let it sit for a few minutes, turned it back on, and then I had to leave for home.

     

    This morning I was curious to follow up on my issue. I read your instructions and realized I had basically completed them in a hyperbolic manner. Now my Flow in question works - and to-boot I have extra information on what to do the next time I need to copy a Flow!

     

    Thanks again, Michael! You rock!

  • sam88 Profile Picture
    2 on at

    sam88_0-1706052976664.png

    I get this error with retrieve email in my flow.  It's launching the application fine, and if I skip this step when the error throws it exits the outlook application just fine.  What am I doing wrong?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard