Every time you use a Google apps script class in your script that accesses your account or data, Google will inform you and ask for your consent. Also, every time you add a new class that accesses your data you will have to go through the process again.
This process is not straight forward like click here to accept permissions, you will have to deal with a couple of dialogs, and it can get confusing. So, check this guide if you have any problem accepting the permissions and running your script.
Run the script or add a trigger
First, you need to run the script, so you can use the run button from the toolbar or you can add a trigger. In both situations, Google will ask you to accept permissions.
![run-script-google-spreadsheet](https://howtogapps.com/wp-content/uploads/2020/03/run-script-google-spreadsheet.jpg)
Next, Google script will inform you that you need to review and accept certain permissions for the project “Export and email as PDF 1”
![authorization-required-to-run-a-script](https://howtogapps.com/wp-content/uploads/2020/03/authorization-required-to-run-a-script.jpg)
After you press on the “Review Permissions” button, a new window will open to let you select which account to use to grant permission to your script. If you are logged in with more then one account, you have to select which one to use. Just click on the account to continue.
![choose-an-account-to-continue](https://howtogapps.com/wp-content/uploads/2020/03/choose-an-account-to-continue.jpg)
Here is the part that can get confusing if you don’t notice the link in the bottom left. Also, If you are using a G Suit account you won’t get this type of notification and you can skip ahead.
So, Google will inform you that this app isn’t verified and to only proceed if you know and trust the developer. Since you are the developer, and I hope you trust yourself (and me), click on the link “Advance” to open the extra options.
![app-isn't-verified-warning](https://howtogapps.com/wp-content/uploads/2020/03/app-isnt-verified-warning.jpg)
Here, again, Google will note that the app hasn’t been reviewed and it will give you the link to continue “Go to Export and email as PDF 1 (unsafe)” (for you it’s going to be the name of your script).
![access-unsafe-app-isn't-verified-warning](https://howtogapps.com/wp-content/uploads/2020/03/access-unsafe-app-isnt-verified-warning.jpg)
After you click on the link, a new window will open with the list of permissions that the app needs. Review the permissions and click on the “Allow” button.
![Allow-app-to-access-your-account-Google-Script](https://howtogapps.com/wp-content/uploads/2020/03/Allow-app-to-access-your-account-Google-Script.jpg)
That’s it, now your script can execute and hopefully give you the result you expect.