Если вы можете использовать EWS вместо Graph API, попробуйте exchangelib . Что-то вроде:
from time import sleep
from exchangelib import Account, Credentials
a = Account(
'john@example.com',
credentials=Credentials('user', 'pass'),
autodiscover=True
)
while True:
for m in a.inbox.filter(subject__contains='My Trigger', is_read=False):
m.forward(
subject='Fwd: My Trigger',
body='Hey, look at this!',
to_recipients=['carl@example.com']
)
m.is_read = True
m.save(update_fields=['is_read'])
sleep(60)