appscript.dev
Automation Beginner Slides Drive

Archive a dated status-snapshot deck weekly

Keep a visual history of Northwind progress — one snapshot deck per week, all in a folder.

Published Nov 16, 2025

Northwind keeps one live status deck that the team edits all week — the latest numbers, the current blockers, what shipped. It is always up to date, which also means last week’s picture is gone the moment someone edits a slide. There is no way to look back and see how things stood a month ago.

This script fixes that without changing how the team works. Once a week it takes a copy of the live deck, stamps the date into the file name, and files it in a snapshots folder. The team keeps editing the one live deck; the snapshots folder quietly builds a week-by-week visual history alongside it.

What you’ll need

  • The live status deck — a Google Slides file the team edits each week. You need its file ID, the string in the URL after /d/.
  • A Drive folder to hold the snapshots, and its folder ID (the string after /folders/ in the folder’s URL).

The script

// The live status deck the team edits each week.
const LIVE_DECK = '1abcLiveStatusDeckId';

// The folder where dated snapshot copies are filed.
const SNAPSHOT_FOLDER = '1abcStatusSnapshotsId';

/**
 * Copies the live status deck into the snapshots folder, naming the
 * copy with the current date so each week's picture is preserved.
 */
function snapshotStatusDeck() {
  // 1. Get a handle on the live deck.
  const file = DriveApp.getFileById(LIVE_DECK);

  // 2. Build a date stamp for this week's snapshot name.
  const week = Utilities.formatDate(new Date(), 'GMT', 'yyyy-MM-dd');

  // 3. Copy the deck into the snapshots folder under a dated name.
  file.makeCopy(`Status — ${week}`, DriveApp.getFolderById(SNAPSHOT_FOLDER));
  Logger.log(`Snapshot saved: Status — ${week}`);
}

How it works

  1. snapshotStatusDeck opens the live deck by ID with DriveApp.getFileById.
  2. It formats the current date as yyyy-MM-dd — a sortable stamp so the snapshots line up chronologically in the folder.
  3. It calls makeCopy, passing the dated name and the snapshots folder, which places a complete, independent copy of the deck there.

Because it copies rather than moves, the live deck is never touched — the team carries on editing the same file every week.

Example run

Run on Friday 23 May 2026, the snapshots folder gains one file:

Status — 2026-05-23

After a few weeks the folder reads as a clean timeline:

Status — 2026-05-09
Status — 2026-05-16
Status — 2026-05-23

Open any one and you see exactly how the project stood that Friday.

Trigger it

Run this on a weekly timer so the snapshot is taken at a consistent point in the week:

  1. In the Apps Script editor open Triggers and click Add Trigger.
  2. Choose snapshotStatusDeck, set the event source to Time-driven, then pick a Week timer for Friday and an hour of 5pm to 6pm.

Friday at 5pm captures the deck at the end of the working week, before anyone starts editing for the next one.

Watch out for

  • The snapshot is a full copy, frozen at run time. Editing it later does not affect the live deck and vice versa — that is the point, but it means a typo fixed in the live deck stays wrong in past snapshots.
  • The date stamp uses GMT. If Northwind is far from UTC, a Friday-evening run could be stamped with Saturday’s date. Pass your own timezone string to formatDate if the exact label matters.
  • Two runs on the same day produce two files with the same name — Drive allows duplicate names. The trigger fires weekly, so this only happens if you also run it by hand.
  • Copies accumulate forever. A year of weekly snapshots is 52 decks; tidy old ones occasionally or accept a long folder.
  • Copying a large deck counts against your Drive storage quota each week.

Related