Backup Project as zip File using Google Apps Script

Gists

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:

 Share!