cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JanLektonen
Level: Powered On

Office365.GetEmails(...) only shows 25 mails from a useraccount

I'm retrieving e-mails from Office365 via this powerapp function:

 

Office365.GetEmails({folderPath: displayMailsFrom, fetchOnlyUnread:false, top:25, searchQuery: TextInputSearchMails.Text})

 

My problem is that I would like to list more than 25 emails to the user. How do I achieve this. The documentation only gives me a choice to use "TOP:25" and get 25 e-mails to display in gallery.

 

How do I retrieve the rest/more of the e-mails?

7 REPLIES 7
Community Support Team
Community Support Team

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

You should be able to specify the a larger number in order to get more Emails, the default value for the top Syntax is 10:

 

For example, to get 100 Email, specify the Top parameter as 100:

Office365.GetEmails({folderPath: displayMailsFrom, fetchOnlyUnread:false, top:100, searchQuery: TextInputSearchMails.Text})

For more ifnormation about this action, see:

https://docs.microsoft.com/en-us/connectors/office365/

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JanLektonen
Level: Powered On

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

Thanks - but it is only possible to retrieve 25 emails. Please try it out and you will se that the maximum mails in the list will be 25 e-mails.

Highlighted
Microsoft Employee

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

This does not work with GetEmails or with GetEmailsV2. It is restricting to 25 emails and forces to mention that in the code. I tried top:26 and gave the error. see the screen shot.

 

 

Django
Level: Powered On

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

Any update on this?

I see the 25 limit is not mentioned in the documentation --> this would be very wise to do:

db1989
Level: Powered On

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

I had the same issue and was thinking about a possible workaround.

 

What if I am just use a combination of multiple collect statements?!

 

The first collect statements clears the collection and takes the top 25 e-mails.

The second collect statements skips the first 25 messages and then takes the top 25 messages.

The third .........

 

db1989_0-1572363713387.png

 

Aren't we now able to collect as many e-mails as we want by just adding more collect statements?

Django
Level: Powered On

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

I like the way you think 😉

If you test please let us know what the results are. I can think of the following issues:

  1. Perfomance issue for end user
    (because every collect is a new request for data the network connection needs to act every collect) 
  2. Throttling limits (see https://docs.microsoft.com/en-us/connectors/office365connector/)
    (because there is a throttling limit in most connectors the number of API requests can be maxed)
db1989
Level: Powered On

Re: Office365.GetEmails(...) only shows 25 mails from a useraccount

FYI I am not planning to fully testing the idea as my business case is now a different one.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,616)