79342771

Date: 2025-01-09 13:29:36
Score: 3.5
Natty:
Report link

Does anyone have an idea of what could be wrong? Is there a better approach to opening a document using a URL?

You can try this approach:

function myFunction() {
  var url = "1bmad4K86Ov1zQHiu8gbX6GpOSL9kbNGKiE3jmaJN9N8";
  var doc = DocumentApp.openById(url);
}

If you do not have access to it it will show the following error:

Exception: Action not allowed

Reference: openById()

Reasons:
  • Blacklisted phrase (1): what could be
  • Whitelisted phrase (-1): try this
  • RegEx Blacklisted phrase (3): Does anyone have an idea
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: EL SRY