Why the sandbox blocks you
Apps Script has two categories of trigger. Simple triggers are the reserved function names — onOpen, onEdit, onSelectionChange — that Google fires automatically without asking the user for consent. Because they run without an OAuth handshake, they operate in a stripped-down sandbox: read and write spreadsheet cells, yes; call GmailApp, UrlFetchApp, DriveApp, or any service that touches data outside the sheet, no. The error message 'You do not have permission to call X' is the sandbox enforcing that boundary, not a quota issue or an account restriction.
The function works fine when you run it manually in the editor because the editor prompts for consent on first run and stores a token. The trigger fires under a different execution context with no stored token, so the same function call fails. This asymmetry is the first thing that confuses people: it looks like the code is fine and the trigger is broken, when actually the trigger type is the constraint.