I'm using a custom created google apps script to send out some emails. I have a PDF in my google drive that I am trying to attach to an email but it is not working. I keep on getting the error "Document is missing (perhaps it was deleted?)"
Here is my full code...
function sendDetails(e) {
var itemURL = 'https://docs.google.com/file/d/0Bw7JWLKeRBKASUFldGM1RTRIaFE/edit';
var docName = DocumentApp.openByUrl(itemURL).getName();
}
Note that the above PDF is a publicly accessible PDF file that anyone can get to. I know it exists but it's not allowing me to access it. All that I am trying to do is take the file and attach it to an email. There is obviously more to my code than the about but I trimmed down just to that to try to narrow the error and no such luck. Any help would be greatly appreciated.