Use Gmail: Moving a gmail message outside a for each

Is it possible to move an gmail email message in this scenario?

Dispatcher:
[ Use Gmail scope ] > [ For each Email ] > save list of emails in datatable, including Uid

Performer:
First process email data, then
[ Use Gmail scope ] > [ Get email by Id: use the Uid, save found email as output variable ‘MoveThisEmail’] > [ Move email: using ‘MoveThisEmail’ ]

Somehow this doesn’t work for me. The exception thrown is
afbeelding

Moving the email works fine when inside the [ For each Email ].

And I now see in the docs ( https://docs.uipath.com/activities/docs/move-mail-x ) that they say

Should be used for the currently selected Outlook email, or in a For Each Email activity when iterating through Gmail, or Outlook emails.

This seems very limited. Is there no way to do this?
I’d be very disappointed if I’d have to build a 2nd [ For each Email ] where I again have to fetch all mails and check each result if the Uid matches to find the proper email, and to be able to move it then.

Hi @Whynotrobot

I believe that is the case. But you need not loop through all emails again rather save some details like date, which will contain the timestamp as well which you can use as a filter in for each email and only the required email should be retrieved

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.