cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jakson
Resolver I
Resolver I

Retrieve Email Messages returns weird error

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?

1 ACCEPTED SOLUTION

Accepted Solutions
MichaelAnnis
Super User
Super User

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. 

View solution in original post

2 REPLIES 2
MichaelAnnis
Super User
Super User

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. 

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!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (1,986)