async function callAppsScript(auth) {
  const script = google.script({version: 'v1', auth});
  let res = await script.projects.create({
    resource: {
      title: 'My Script',
    },
  });
  res = await script.projects.updateContent({
    scriptId: res.data.scriptId,
    auth,
    resource: {
      files: [
        {
          name: 'hello',
          type: 'SERVER_JS',
          source: 'function helloWorld() {\n  console.log("Hello, world!");\n}',
        },
        {
          name: 'appsscript',
          type: 'JSON',
          source:
            '{"timeZone":"America/New_York","exceptionLogging":' + '"CLOUD"}',
        },
      ],
    },
  });
  console.log(`https://script.google.com/d/${res.data.scriptId}/edit`);
}
Creates a new script project, upload a file, and log the script's URL.
@param {google.auth.OAuth2} auth An authorized OAuth2 client.