回答

1

沒有看到你的代碼,這在我看來,你需要在你
「appsscript.json」,包括文件的正確範圍。

// This scope allows you to: 'View your email messages and settings' 
"oauthScopes": ["https://www.googleapis.com/auth/gmail.readonly"] 

// This scope gives you full access to your Gmail - 'Read, send, delete, and manage your email' 
"oauthScopes": ["https://mail.google.com/"] 

在這裏看到的範圍文檔:https://developers.google.com/identity/protocols/googlescopes#gmailv1