Skip to content

Conversation

@rSnapkoOpenOps
Copy link
Collaborator

@rSnapkoOpenOps rSnapkoOpenOps commented Jan 28, 2026

Fixes OPS-3297

We need to keep the balance between fetched mails and amount of actions. 50 looks fine.

The API is limited to 4 requests https://learn.microsoft.com/en-us/graph/throttling-limits#outlook-service-limits

image

@linear
Copy link

linear bot commented Jan 28, 2026

@sonarqubecloud
Copy link

@rSnapkoOpenOps rSnapkoOpenOps marked this pull request as ready for review January 28, 2026 12:45
Copilot AI review requested due to automatic review settings January 28, 2026 12:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR limits the number of emails fetched in the new-email trigger to the top 50 most recent emails to balance between data fetching and API rate limits. Microsoft Graph API has a throttling limit of 4 requests per second for Outlook services, and this change helps stay within those constraints.

Changes:

  • Added .top(50) to the email query to limit results to 50 most recent emails

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rSnapkoOpenOps rSnapkoOpenOps merged commit 2a7d1e2 into main Jan 29, 2026
21 checks passed
@rSnapkoOpenOps rSnapkoOpenOps deleted the fix/outlook-limit branch January 29, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants