GASのメール送信ができない…それならマニフェスト設定だ(appsscript.json)

Googleフォームで入力されたメールアドレス宛にメールを自動送信するよう設定したく、GAS(Google Apps Script)でGmailApp.sendEmailを使おうとしたら権限がないって蹴られちゃいました。 Exception: スクリプトにはその操作を行う権限がありません。その操作を行うには「(https://www.googleapis.com/auth/gmail.send || https://www.googleapis.com/auth/gmail.compose || https://www.googleapis.com/auth/gmail.modify || https://mail.google.com/ || https://www.googleapis.com/auth/gmail.addons.current.action.compose)」権限が必要です。 at autoNotify(コード:27:12) 気を取り直してMailApp.sendEmailを使っても同じようなエラー。console.logでメールアドレス自体は取れているけれど、メール送信ができていません。 Exception: MailApp.sendEmail を呼び出す権限がありません。必要な権限: https://www.googleapis.com/auth/script.send_mail at autoNotify(コード:28:11) https://www.googleapis.com/auth/script.send_mail You are receiving this error either because your input OAuth2 scope name is invalid or it refers to a newer scope that is outside the domain of this legacy API. This API was built at a time when the scope name format was not yet standardized. This is no longer the case and all valid scope names (both old and new) are catalogued at https://developers.google.com/identity/protocols/oauth2/scopes. Use that webpage to lookup (manually) the scope name associated with the API you are trying to call and use it to … Continue reading GASのメール送信ができない…それならマニフェスト設定だ(appsscript.json)