Automating AWS SES and ERPNext takes no code: a ready-made scenario does the routine for you.
Starts when: Schedule Trigger
Then: Get Gmail
Then: Limit
Check: If
If yes: Email
Then: Summary Email OpenAI
Then: Create Google Docs
Then: Update Google Docs
If no: No Email
You can launch this AWS SES + ERPNext integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.