InTouch Hub · Blue Isle Software

Drawing Folder Watcher

Poll a Google Drive folder for new and revised construction drawings; daily/hourly digest by project. Detects file additions and modified-time changes via Sheet-backed state. (For machine shops with Gmail-attached drawings, use drawing-rev-watcher instead.)

Drawing Folder Watcher

Daily/hourly digest of new and revised drawings in a Google Drive folder.

Sibling workflow

This is the GC / Construction drawing watcher. For shops where drawings arrive as Gmail attachments (machine shops, fabricators, suppliers), use drawing-rev-watcher instead — that one extracts part numbers from PDF title blocks via AI and tracks revisions against a part-master Sheet.

Use this one when drawings live in a shared Drive folder (architectural sets, MEP coordination drawings, structural calcs).

What it does

  1. Lists files in a Drive folder (your project's drawings shared folder).
  2. Compares to the last-known state (stored in a Google Sheet so reruns are idempotent).
  3. Emits a digest: new files added since last check, files whose modifiedTime changed (revisions).
  4. Updates the state Sheet for next run.
  5. Sends the digest to the PM.

Pattern note

This workflow uses a single runtimeenv task that invokes gog directly for the four Google operations (read Drive listing, read state, clear state, append state). The runtimeenv receives the Google Workspace credential via credentialNames, so gog is automatically authenticated.

Why not strict hybrid (separate google_workspace tasks per op)? Because state-keeping has two reads + two writes; splitting into 5+ tasks would force passing JSON state between tasks via template substitution, which is fragile under shell quoting. One runtimeenv task with credentialNames is cleaner here.

Setup

1. Drive folder

Any shared Drive or My Drive folder. Note the folder ID from the URL. Grant your service account Viewer access.

2. State Sheet

Create a Sheet (anywhere; the service account needs Editor on it). Add a tab DrawingState with this header row:

file_id file_name modified_time last_seen_at

The workflow rewrites rows 2+ on every run. Don't manually edit.

3. Credential + contact + placeholders

Replace these in workflow.yaml: - <<GOOGLE_WORKSPACE_CREDENTIAL>> — your credential name (Sheets + Drive scope) - <<DRIVE_FOLDER_ID>> — the drawing folder ID - <<STATE_SHEET_ID>> — the state Sheet ID - <<PM_PUBLISHER>> — your PM contact's user name

4. Schedule

Suggested: hourly during work hours, or daily 6:00 AM. Frequent polling = faster alerts; less frequent = less Drive API quota use.

First run

The first run treats every file in the folder as "new" because the state Sheet is empty. Expect a long digest on day one. After that, only changes show up.

Limitations