I want to know if there's anything in Python that can constantly read my Outlook messages every five minutes. I want it to just check my email every 5 minutes (3:05PM, 3:10PM, 3:15PM, etc.) and as soon as an email comes in my inbox saying with a subject line like "Hello what's up" I want Python to automatically trigger a piece of .py code.
What I know so far
I already know how to access Outlook -
import win32com.client
win32com.client.Dispatch('outlook.application')
mapi = outlook.GetNamespace("MAPI")
inbox = mapi.GetDefaultFolder(1)
...
...
Some possibilities
I am currently looking at a couple links such as persistently running Python in the background, listening for oncoming emails with Python, how to trigger a script upon email receipt as well as a Youtube video that talks about how to run a python script upon sending an email.
Hopefully I'll be able to figure out exactly how to run my Python script upon receipt of email, but in the meantime this question stays open. Thanks in advance.