cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShaunW
Helper I
Helper I

Get Email v3 Problem

THE SOLUTION DOESN'T SOLVE MY PROBLEM -- PLEASE DON'T USE IT.

 

Hi, I'm experiencing an issue with a flow that is being run by a "run-only" user.

 

The Flow runs fine for me (I created the flow).

 

I am trying to get an email that I just sent using GetEmail(v3) (if there's another way to get the messageID of the email I just sent earlier in the flow, let me know).

 

Screen Shot 2020-04-21 at 9.11.04 PM.png

 

Screen Shot 2020-04-22 at 9.29.51 AM.png

 

I get the following error: "The specified object was not found in the store., The process failed to get the correct properties."

 

Screen Shot 2020-04-21 at 9.10.10 PM.png

 

@DeepakS (hoping you can help me here also! -- thanks again for your help last time).

 

Please help.

 

Shaun

 

**** UPDATE ****

 

I did some research and looked at the "peek code". I added a connection for User2.

 

Screen Shot 2020-04-22 at 12.47.59 PM.png

 

I then added a second SendEmail(v3) action for comparison purposes. I then compared the folder path's/ID's of both User1 (flow creator) and User2 (run-only user):

 

User1: 

"folderPath": "Id:[.............]BCQAAAA=="
User2:
"folderPath": "Id:[.............]gEJAAAA",
 
This implies that when User2 (run-only) runs the Flow, SendEmail(v3) tries to use the Folder Path of User1 (flow creator), which doesn't not exist on User2's outlook/email/graph.
1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @ShaunW ,

 

You couldn't get the message id of the sent email in the flow directly currently.

The alternative way is get all the items from the sent items folder and search for the sent email then get it.

Please take a try to refer to screenshot below to create the flow:

1.png2.png

 

There is a 25 items limit for the "Get emails" action currently, so please make sure that you could get the sent email in the "Get emails" action.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
efialttes
Super User
Super User

Hi!
I believe 'Get email' needs the Msg ID as input, right? So if you need to read an email you just sent, which MsgID are you using?

I managed to do this 2 years ago with Office 365 Outlook by adding a timestamp to the subject, then two paralel branches:
-delay + send the email
-add a trigger 'when a new email is received', folder 'sent' and use the timestamp as pattern.

But, tried again this trick one month ago and failed with Office 365 Outlook. An arror was shown when saving the flow

Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-alzhan-msft
Community Support
Community Support

Hi @ShaunW ,

 

You couldn't get the message id of the sent email in the flow directly currently.

The alternative way is get all the items from the sent items folder and search for the sent email then get it.

Please take a try to refer to screenshot below to create the flow:

1.png2.png

 

There is a 25 items limit for the "Get emails" action currently, so please make sure that you could get the sent email in the "Get emails" action.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The method that suggested by @v-alzhan-msft  is workable but slow, as you have to iterate through each message retrieved by "Get emails (V3)" action.

 

To be more fast you can use GRAPH API. In action "Invoke an HTTP request" execute the following request:

GET https://graph.microsoft.com/v1.0/me/mailfolders/sentitems/messages/?$filter=subject eq 'testsubject 1' 

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

@v-alzhan-msft,

 

Thank you for helping. As I mentioned, the flow is working correctly w/ NO issues IF I (User1) run the flow myself (I created the flow).

 

I added a second user (User2) as a run-only user. When User2 runs the flow, the flow gets the above error for GetEmail(V3)

 

Screen Shot 2020-04-22 at 9.29.51 AM.png

@v-alzhan-msft , @VictorIvanidze ,

 

I did some research and looked at the "peek code". I added a connection for User2.

 

Screen Shot 2020-04-22 at 12.47.59 PM.png

 

I then added a second SendEmail(v3) action for comparison purposes. I then compared the folder path's/ID's of both User1 (flow creator) and User2 (run-only user):

 

User1: 

"folderPath": "Id:[.............]BCQAAAA=="
User2:
"folderPath": "Id:[.............]gEJAAAA",
 
This implies that when User2 (run-only) runs the Flow, SendEmail(v3) tries to use the Folder Path of User1 (flow creator), which doesn't not exist on User2's outlook/email/graph.

Hi Shaun

 

Did you manage to find a solution to this? I have exact same problem. It works fine for 2nd user if its a get from 'Inbox' but 'Sent' causes the same error message.

 

James

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,769)