-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Microsoft integration] getFullMessageList #9544
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Implemented Microsoft Graph API integration for message fetching, adding support for retrieving email messages from Microsoft 365 alongside the existing Gmail integration.
- Fixed incorrect
MESSAGING_MICROSOFT_USERS_MESSAGES_LIST_MAX_RESULT
value in/packages/twenty-server/src/modules/messaging/message-import-manager/drivers/microsoft/services/microsoft-get-message-list.service.ts
(set to 1 instead of 1000) - Missing error handling for Microsoft Graph API calls in
microsoft-get-message-list.service.ts
- Using beta API version instead of stable in Microsoft Graph API calls
- Incomplete
getPartialMessageList
implementation for Microsoft provider returns empty values - Incorrect redirect URIs in documentation referencing Google endpoints instead of Microsoft ones
7 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings | Greptile
...endar/calendar-event-import-manager/crons/commands/calendar-event-list-fetch.cron.command.ts
Outdated
Show resolved
Hide resolved
...es/messaging/message-import-manager/drivers/microsoft/providers/microsoft-client.provider.ts
Outdated
Show resolved
Hide resolved
...ging/message-import-manager/drivers/microsoft/services/microsoft-get-message-list.service.ts
Outdated
Show resolved
Hide resolved
...es/messaging/message-import-manager/drivers/microsoft/providers/microsoft-client.provider.ts
Outdated
Show resolved
Hide resolved
...ging/message-import-manager/drivers/microsoft/services/microsoft-get-message-list.service.ts
Show resolved
Hide resolved
const response: PageCollection = await microsoftClient | ||
.api(syncCursor || '/me/mailfolders/inbox/messages/delta?$select=id') | ||
.version('beta') | ||
.headers({ | ||
Prefer: `odata.maxpagesize=${MESSAGING_MICROSOFT_USERS_MESSAGES_LIST_MAX_RESULT}`, | ||
}) | ||
.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: No try-catch block around API call that could fail due to network issues or invalid tokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only interesting thing we might talk out loud
...ules/messaging/message-import-manager/drivers/microsoft/messaging-microsoft-driver.module.ts
Outdated
Show resolved
Hide resolved
...ules/messaging/message-import-manager/drivers/microsoft/messaging-microsoft-driver.module.ts
Outdated
Show resolved
Hide resolved
packages/twenty-website/src/content/developers/self-hosting/setup.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creation of the GmailGetMessageListService
Implementation of the driver to MS Graph API getFullMessageList