title: Use Google Script's Web App as Webhook to receive Push Notification directly
body: <p>My Goal: Changes in Google Drive => Push Notification to <a href="https://script.google.com/a/macros/my-domain/" rel="noreferrer">https://script.google.com/a/macros/my-domain/</a>... => App is pushed to take action.
  I don't want to setup an middle Webhook agent for receiving notification. Instead, let the Web App (by Google Script) to receive it and be pushed directly. </p>
  
  <p>Since the relevant function is quite undocumented (just here: <a href="https://developers.google.com/drive/web/push" rel="noreferrer">https://developers.google.com/drive/web/push</a>) , below is the code I tried but failure.
   1. Is above idea feasible?? 
   2. My code doPost(R) seems cannot receive notification (R parameter) properly. Anyway, no response after I change the Google Drive. Any problem? (I have tried to log the input parameter R so as to see its real structure and decide if the parameter Obj for OAuth is the same as normal Drive App, but error occur before log)</p>
  
  <pre><code>function SetWatchByOnce(){
    var Channel = {
      'address': 'https://script.google.com/a/macros/my-domain/.../exec',
      'type': 'web_hook',
      'id': 'my-UUID'
    };
  
    var Result = Drive.Changes.watch(Channel); 
    ...
  }    
  
  function doPost(R) {
    var SysEmail = "My Email";
    MailApp.sendEmail(SysEmail, 'Testing ', 'Successfully to received Push Notification');
  
    var Response = JSON.parse(R.parameters);
    if (Response.kind == "drive#add") {
      var FileId = Response.fileId;
      MyFile = DriveApp.getFolderById(FileId);
      ...
    }
  }
  
  
  function doGet(e) {
    var HTMLToOutput;  
    var SysEmail = "My Email";
  
    if (e.parameters.kind) { 
        //I think this part is not needed, since Push Notification by Drive is via Post, not Get. I should use onPost() to receive it. Right?
  
      } else if (e.parameters.code) { 
        getAndStoreAccessToken(e.parameters.code);
        HTMLToOutput = '&lt;html&gt;&lt;h1&gt;App is successfully installed.&lt;/h1&gt;&lt;/html&gt;';
  
      } else { //we are starting from scratch or resetting
        HTMLToOutput = "&lt;html&gt;&lt;h1&gt;Install this App now...!&lt;/h1&gt;&lt;a href='" + getURLForAuthorization() + "'&gt;click here to start&lt;/a&gt;&lt;/html&gt;";
      }  
  
      return HtmlService.createHtmlOutput(HTMLToOutput);  
    }
  
  
  ....
  </code></pre>