Skip to content

Instantly share code, notes, and snippets.

@tanaikech
Last active July 2, 2020 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanaikech/035aa9f6603e7a8698c1cc67ab43e132 to your computer and use it in GitHub Desktop.
Save tanaikech/035aa9f6603e7a8698c1cc67ab43e132 to your computer and use it in GitHub Desktop.
Backup Project as zip File using Google Apps Script

Backup Project as zip File using Google Apps Script

This is a sample script for backing up a project as a zip file. When you use this script, please install a GAS library of ProjectApp2. You can back up both the standalone script type and the container-bound script type.

In this script, the blob of zip file can be retrieved from ProjectApp2. So you can also send it as email without creating a file.

var projectId = "### fileId of project ###";
var blob = ProjectApp2.getProjectBlob(projectId, true);
DriveApp.createFile(blob[0].setName("backupProject.zip"));

Testing:

  • July 2, 2020: I could confirm that the script worked. So in the current stage, it seems that the specification is not changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment