-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Feat] Add Microsoft Outlook - Mail Actions #3419
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
base: master
Are you sure you want to change the base?
Conversation
Created _create_message function to compose emails with Graph APIh Added send mail function
…tionality Removed content_bytes from filter query as Microsoft uses queries on base attachment file which does have content_bytes and is specific to fileattachments Also fixed some mypy type issues
- Improved email validation logic and reduced bloated code - Add _create_recipients() to allow both 'email' and 'Name <email>' formats - Switched BeautifulSoup to html2text - Rename 'id' to 'message_id' - Add server_close() - Add dependency to pyproject.toml Fixed some docstring
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…date dependencies
Add fixtures and tests covering send_email, create_draft_email, and send_draft_email with success, failure, and validation scenarios.
…tachments methods covering success, failure, and edge cases including metadata-only retrieval and file saving functionality.
|
Hi @Wendong-Fan |
Regarding this issue, I think this is unrelated to my pr and the reason I am getting this is because i pushed uv lock file due to which we tied creating new environment instead of one in cache |
|
I have added the remaining tests and function Also I choose update_draft_message instead of update_message as updating sent message only changes data on our side like changing cc recipients wont send them mail again, so it wouldnt be very helpful for a llm toolkit in my opinion or even in general other than faking a sent mail. I have completed the mail part of actions for now but feel free to let me know if there are any suggestions or change either regarding this pr or in general that might help me. Thanks |
|
Also to make reviewers life easier 1 Go to https://portal.azure.com/ Thats it Now just add these creds to env (for personal account dont add tenant id or if you want add "common" ) and the code should work Later we should also add all this to example file ( I didnt create it since i dont have open ai credits) |
Hey @Tanuj-Taneja1, I will have a look at this issue and see why this may be happening, also moving forward feel free to message me with any concerns or issues you may face! |
Hi @waleedalzarooni, I think the issue has been fixed in pr #3427 |
- Resolved merge conflicts in uv.lock
I have resolved the merge conflict and now all the tests seems to be running fine Also I face following issue with mypy, if there is a solution to these do let me know |
|
Hi @waleedalzarooni , I will start working on calender actions soon and was thinking about keeping it in seperate file, will that be alright. |
|
Hey @Tanuj-Taneja1, No problem go ahead with the separate calendar functionality, thanks again for your effort on the PR. I will be passing it to reviewers promptly so we can put your hard work to use! |
MuggleJinx
left a comment
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.
Thanks for the contribution @Tanuj-Taneja1 ! The overall implementation looks good, I found some small issues!
Added reply and update function to get tools Removed api_key_required decorator
|
Hey @Tanuj-Taneja1, I am currently working on reviewing your implementation, one thing to note for toolkits is that we typically have example files for each toolkit to demonstrate usage, would you mind creating one for the Microsoft toolkit (use the |
waleedalzarooni
left a comment
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.
Really good implementation @Tanuj-Taneja1,
Previous reviewers have touched one all the points I had, once the example file is ready I will do some rigorous OAUTH testing and we should be good to go!
Hi @waleedalzarooni I think I can give you a notebook file which runs all the functions and setup instructions , would that be helpful? If yes heres the link: |
Moved previous auth logic to _authenticate_using_browser Created CustomAzureCredential which handles refresh and access token management Added _authenticate_using_refresh_token function which uses refresh token to return custom credential object for msgraph client
Added a ,
… network interfaces Changes host from "" to "127.0.0.1" Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Description
Fixes #3201
Hi @Wendong-Fan
I have completed the mail actions part of Outlook toolkit and this pr is ready to review.
Also I wanted to split other outlook related actions (like calender) into seperate file, so if that is ok we can rename this file to something mail related.
Reference:
msgraph
msgraph (some docs like send mail are in users section for some reason)
authorizationcodecredential for auth
(This is a edited conversation, older conversation was draft related)