Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

I can't run my Google Apps Script Apps

Hey...

I have a google apps script that connect with google form, spreadsheet and google drive.

When i run the code, it show an error:

Exception: We're sorry, a server error occurred. Please wait a bit and try again.
 
The error code is:
  var file = DriveApp.getFileById(fileId);
 
just to know, this apps code, is work in other account, but not in this account.
 
showed this:
Screenshot (415).png
0 1 82
1 REPLY 1

Hi JustPin,

Welcome to Google Cloud Community!

Based on the error you’re encountering, it appears that your Principal account is missing the necessary IAM role. To resolve this issue,you must add role resourcemanager and serviceusage. 

For guidelines, please refer to the following documentation about Access controls with IAM

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Top Labels in this Space
Top Solution Authors