Backup Web Pages to Google Drive Automatically

This Google Script will take a daily snapshot of a particular web page and saves it as an HTML file in the Google Drive. The code can be extended to backup your native Google Document in standard formats like PDF.

The Google Script by @hijonathan will create daily (or hourly or weekly) backups of any web pages and save it as an HTML file in your Google Drive. You can choose to overwrite the existing file or the backup process can create new copies. The files are saved in date-based folders making it easier for you to retrieve the backup for any particular day.

You’ll have to specify the web page URL and then create a time-based trigger that will run the createBackup() method at specified intervals. Also, only the HTML content of the web page is saved and not the CSS, JS or other associated files.