cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Power Participant
Power Participant

Get flagged emails only

Hi all!
I need to show a list of all flagged emails, which works for some users but not for others.

 

I have tried using both GetEmailsV2 & V3. For myself it works brilliantly, but not for a colleague using the app; he gets no email at all even if he does indeed have flagged emails.

 

I have set a data table's Items-property to:

Office365Outlook.GetEmailsV3({fetchOnlyFlagged:true}).value

 

As I wrote, it works very well for me but not for a colleague - why and what can I do to remedy it?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Participant
Power Participant

Re: Get flagged emails only

I think we found the "problem": when getting flagged messages it retrieves unread messages only! To get flagged messages that also have been read, you have to specify the fetchOnlyUnread:false as well.

 

It would be a great idea to update the documentation with this information!!!!!

View solution in original post

9 REPLIES 9
Highlighted
Community Support
Community Support

Re: Get flagged emails only

Hi @BitLord69 ,

Are there some error messages occurred when your end users run the Office365Outlook.GetEmailsV3() function on their side?

Do these end users own same Office 365 license as you for accessing Outlook connector from canvas app?

 

I have made a test on my side, and don't have the issue that you mentioned. Firstly, please make sure your end users have enabled  REST API feature for their Office 365 Mailbox.

There are some known limits with Office 365 Outlook connector in PowerApps, please check the following article:

https://docs.microsoft.com/en-us/connectors/office365/#known-issues-and-limitations

 

Also please make sure your end users have owned proper Office 365 license to use Office 365 Outlook connector in canvas app (same with you at least).

 

In addition, also please make sure they have owned proper PowerApps license for accessing PowerApps canvas app you shared to them.

Note: When your end user to access your shared canvas app, he would be prompted to provide their own credential to create connection to Office 365 Outlook connected used in your shared app. Please make sure your colleague provide his own proper credential to create a connection to the Office 365 Outlook connector used in your app

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Power Participant
Power Participant

Re: Get flagged emails only

Hi Kris!

 

Thanks for your reply.  

 

The other user have the same mail box, he has signed in and accepted the different connectors when he started to use the app. There is no error message at all when trying to see flagged emails.

 

Furthermore, in the app one can also choose to look at calendar events, not yet completed tasks and planner plans/buckets/tasks. All of these things my colleague can access and see; it's only flagged mail that won't dance.

 

In the article you reference, they write:


This operation gets emails from a folder via graph apis. Please note that filtering related to these fields: To, Cc, To Or Cc, From, Importance, Fetch Only With Attachments, Subject Filter, is performed using first 250 items in a given mail folder. To avoid that limitation you can use 'Search Query' field.

 

Could that be the reason? What does the first 250 items mean? Does it sort the mails by date, ascending or descending? My colleague certainly has more than 250 mails in his inbox, so maybe that is why. 

 

They recommend to use the seach query, but as I understand it, you cannot get flagged messages that way.

 

Looking forward to hear more from you.

 

Jan-Erik Karlsson

Highlighted
Community Support
Community Support

Re: Get flagged emails only

Hi @BitLord69 ,

Currently, there is an known limit with the Office365Outlook.GetEmailsV3() function -- It could only return 25 emails at most once time.

If you specify a number value more than 25 for the top attribute, the following error message would show up:

6.JPG

 

How many Flagged emails existed in your end user's mailbox? More than 25? If there are more than 25 Flagged emails existed in your end user's mail box, I afraid that there is no way to achieve your needs.

 

The "fetchOnlyFlagged" attribute is not applied to the "first 250 limits", it could only retrieve 25 emails at most once time. If you want to retrieve the latest 25 Flagged emails, please modify your formula as below:

Office365Outlook.GetEmailsV3({fetchOnlyFlagged:true, top:25, searchQuery:"$orderby=received desc"}).value

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Power Participant
Power Participant

Re: Get flagged emails only

Hi again,

 

I tried this, as per your suggestion:

Office365Outlook.GetEmailsV3({fetchOnlyFlagged:true, top:25, searchQuery:"$orderby=received desc"}).value

 

but my colleague says it still does't work for him. He probably has more than 25 flagged messges in his inbox, but shouldn't your suggestion work anyway?

 

We will try with two beta testers tomorrow, so will see how it works for them.

 

Thanks!

 

Highlighted
Community Support
Community Support

Re: Get flagged emails only

Hi @BitLord69 ,

Currently, there are some known limits with Office 365 Outlook connector, if you want to search all messages within your mailbox, and filter these emails matching the specific criteria, I afraid that the Office 365 Outlook connector could not achieve your needs.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Power Participant
Power Participant

Re: Get flagged emails only

I want to get *only* flagged messages, so what about limitations for that?

Community Support
Community Support

Re: Get flagged emails only

Hi @BitLord69 ,

The Office365Outlook.GetEmailsV3() function currently could only retrieve 25 emails at most once time. In other words, if there are 50 Flagged emails in your Mailbox, this function could only retrieve first 25 emails (You could specify search query within this function to get the latest 25 Flagged emails).

 

If you would like this feature to be improved in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Power Participant
Power Participant

Re: Get flagged emails only

The whole point of the question is: it does not work!  I get zero (0) messages back for some users, even if they have flagged messages.

 

Since it works for me, is there some sort of setting in the mail box they have done that stops the function to work properly? I've read the documentation several times, and there is nothing in it about cases like this.

Highlighted
Power Participant
Power Participant

Re: Get flagged emails only

I think we found the "problem": when getting flagged messages it retrieves unread messages only! To get flagged messages that also have been read, you have to specify the fetchOnlyUnread:false as well.

 

It would be a great idea to update the documentation with this information!!!!!

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,752)