Exception: Service invoked too many times for one day: premium conversion.

200 views
Skip to first unread message

Rafael Yamada

unread,
Jun 23, 2022, 9:01:45 PM6/23/22
to Google Apps Script Community
Hi,

I am getting this error on a onformsubmit event and the line that is being indicated is where I use the command DriveApp.createFile(blob) where blob is a blob from a google doc as application/pdf

Basically what I'm doing is:

var folder = DriveApp.getFolderById(folder_id);

  var file = DriveApp.getFileById(file_id);
  file = file.makeCopy();

  var doc = DocumentApp.openById(file.getId());

  docBlob = doc.getAs('application/pdf');
  docBlob.setName("a.pdf");

  file.setTrashed(true);

  file = DriveApp.createFile(docBlob);  

  file.setSharing(DriveApp.Access.DOMAIN_WITH_LINK, DriveApp.Permission.VIEW);
  file.moveTo(folder);


When I run this from the code editor I got no error.

Rafael Yamada

unread,
Jun 23, 2022, 9:03:30 PM6/23/22
to Google Apps Script Community
Also tried to found what is this service "premium conversion" and the quota and I didn't have success on that.

Jonathan Butler

unread,
Jun 24, 2022, 11:07:40 AM6/24/22
to google-apps-sc...@googlegroups.com
It could be the Documents Created Quota.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/5c1f50bf-193d-4ab6-9894-7185fc87e7dcn%40googlegroups.com.

Rafael Yamada

unread,
Jun 24, 2022, 2:14:07 PM6/24/22
to Google Apps Script Community
But then when I run the code using code editor shouldn't I have the same error message?

And why they indicate the service as "premium conversion"

Jonathan Butler

unread,
Jun 24, 2022, 2:51:45 PM6/24/22
to google-apps-sc...@googlegroups.com
I have zero idea as to why they would label it " premium conversion  ". The only think I can think off is the submit trigger may possibly be on another account from the editor, but it seems unlikely.

Reply all
Reply to author
Forward
0 new messages