cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Community Support
Community Support

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.
Highlighted
Advocate II
Advocate II

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
Microsoft

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.

 

 

Highlighted
Advocate V
Advocate V

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:

Highlighted
Advocate II
Advocate II

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?

Highlighted
Advocate V
Advocate V

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)
Highlighted
Advocate II
Advocate II

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,852)