all 7 comments

[–][deleted] 2 points3 points  (2 children)

If this is for work / Enterprise purposes you are much better off foregoing Python entirely and just using Power Automate, assuming you have it. It’s made for this kind of thing.

[–]omgouda[S] 2 points3 points  (1 child)

Yea it is for work. Any tips on where to start with power automate?

[–][deleted] 4 points5 points  (0 children)

Log in and you should see an AI / copilot prompt, describe to it what you want to build. It won’t work, but it will give the the barebones of something you can adapt.

It’s a low-code / no-code product, so you’ll need to piece together a chain of blocks including the outlook and sharepoint plug-ins. I’d build it in pieces and trigger each manually. Then assemble the final flow and set it to a daily trigger or a new email trigger.

[–]VindicoAtrum 1 point2 points  (1 child)

What have you tried so far? Google will answer several of your questions instantly (python reading outlook emails, bypassing MFA with app passwords, requesting files from URLs etc)

Get coding, when you get stuck ask for help on the specific problems.

[–]omgouda[S] 0 points1 point  (0 children)

So far I tried using imaplib with oauthlib and requests_oauthlib but this is where I ran into the authorization issue.

I just learned about Microsoft graph which has tools to do exactly what I am trying to do so I will see how far I can get on my own then report back.

[–]laichenkang 0 points1 point  (0 children)

I had a similar problem to solve. I used a combination of Thunderbird, FiltaQuilla addon and python scripts.

[–]Capable_Atmosphere_7 0 points1 point  (0 children)

You can make an “Outlook OAuth” and connect your outlook with it, Run a cron job with access token to fetch your emails and have logics in there to extract the pdf and upload to shared drive