cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JanLektonen
Advocate III
Advocate III

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
v-micsh-msft
Community Support
Community Support

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
Advocate III
Advocate III

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.

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.

 

 

Any update on this?

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

db1989
Advocate II
Advocate II

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?

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)

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

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.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,798)