Search code examples
google-apps-scriptgoogle-docsdigital-signature

Signing documents in bulk (Google Docs) using Apps Script


I'd like to create a script to sign some Google Docs in bulk. My first idea was to store a Google drawing with the signature in my drive, and then insert it in the docs. Any better idea than this?

Thank you!

For now I didn't code anything as I'm not convinced of my Google Drawing idea


Solution

  • This put an image a the bottom of a document.

    function signature() {
      const doc = DocumentApp.openById(gobj.globals.testdocid);
      let body = doc.getBody();
      let file = DriveApp.getFileById(gobj.globals.coopersigid).getBlob();//file was a jpg of a signature
      body.appendImage(file);
    }