InTouch Hub · Blue Isle Software

Drawing Revision Watcher

Watches Gmail for drawing-revision emails. For each PDF attachment, AI reads the title block to extract part_number and rev. Looks the part up in a DrawingsTracker Sheet; if the rev is new, archives the old drawing to a Superseded folder, uploads the new drawing to the workflow's Drive folder, updates the tracker, and emails the estimator + production. Catches mid-production rev changes.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

aiarchitecturechange-controlcharacterconstructiondrawingdriveengineeringextractgmailmachine-shopmanufacturingopticalprogressquotereviewruntimeenvshipment

drawing-rev-watcher

Watches Gmail for drawing-revision emails. For each PDF attachment, AI reads the title block to extract part number and revision. Looks the part up in a DrawingsTracker Sheet; if the rev is newer than what's on file, archives the old drawing to a "Superseded" Drive folder, uploads the new drawing to the workflow's working folder, updates the tracker, and emails the estimator + production. The "customer sent rev D mid-production and nobody noticed until parts came off the machine to the old rev" failure mode, automated away.

Use case

Mid-production drawing revisions are a top-five cost center at every machine shop. A customer engineer makes a change (tolerance loosened, hole pattern shifted, surface finish tightened), emails the new rev. The estimator opens it, says "looks fine," and forgets to tell the floor. The floor finishes the lot to the old rev. The customer rejects the shipment. Now there's a 4-week argument about who pays for the scrap.

The fix isn't more discipline. It's a watcher that sees every incoming drawing the second it lands, identifies the part, compares the rev, and pages the right people. This workflow is that watcher.

It does NOT decide for you whether to scrap WIP or get a deviation — that's the engineer's call. It does ensure the engineer KNOWS within 10 minutes that a rev change happened.

Setup

  1. Credentials (Credentials view):
  2. google-workspace — Google Workspace service-account JSON
  3. claude-api — API key for any supported AI provider (Anthropic, OpenAI, Gemini, Mistral, Ollama or OpenRouter)
  4. Runtime environment (Runtime Environments view):
  5. python — auto-created on every OS install
  6. System binary: pdftotext (Poppler utils). Install:
  7. Linux: apt install poppler-utils
  8. macOS: brew install poppler
  9. Windows: install Poppler-Windows binaries and add to PATH
  10. Gmail prep:
  11. Create label drawing-update
  12. Create label drawing-processed
  13. Create a Gmail filter that auto-applies drawing-update to incoming drawing-revision emails. Common filter rules:
    • From customer domains: from:(@customer1.com OR @customer2.com) has:attachment filename:pdf
    • By subject: subject:(revision OR revised OR "new rev" OR "drawing update") has:attachment
    • Replies to existing RFQ threads: combine label:RFQ with has:attachment and subject:re:
  14. Drive prep:
  15. Create a Drive folder called Superseded (or any name) to receive archived old drawings. Copy its FOLDER ID.
  16. Each active workflow already has its own Drive folder (typically created by rfq-triage). The tracker rows below point at those.
  17. DrawingsTracker Sheet (one-time):
  18. Create a Sheet with a tab DrawingsTracker and 6 columns: A part_number | B current_rev | C drive_folder D last_updated | E customer | F notes
  19. Row 1 is the header. Data starts at row 2.
  20. When a new workflow goes into production, add a row: part_number, current_rev, drive_folder (the workflow's working folder ID), customer. Leave last_updated blank (the workflow writes it).
  21. The workflow updates columns B and D when revs change. You maintain A, C, E, F.
  22. Edit workflow.iml — replace the six placeholders:
  23. <<DRAWING_LABEL>>drawing-update (or whatever Gmail label you used)
  24. <<DRAWINGS_TRACKER_SHEET_ID>> — DrawingsTracker spreadsheet ID
  25. <<SUPERSEDED_FOLDER_ID>> — Drive folder ID for archived drawings
  26. <<ALERT_EMAIL>> — estimator + production lead email (use a group address; the alert is high-importance and shouldn't single-point)
  27. <<SHOP_NAME>> — for the alert signature
  28. Schedule every 10 minutes.

Pipeline

  1. fetchruntimeenv (python). Finds the oldest email labeled drawing-update and not yet drawing-processed. Downloads every PDF attachment to a temp directory. Runs pdftotext -layout -l 1 on each to extract first-page text. Emits a JSON blob with the message id, sender, subject, and a drawings list (filename, local_path, first_page_text).

  2. classifyanthropic (claude-sonnet-4-6). For each drawing in the list, identifies whether it's actually an engineering drawing (vs a cover letter, spec, photo), extracts part_number, rev, description, and drawing_number from the title block, and gives a confidence rating. Returns strict JSON.

  3. actruntimeenv (python). For each classified drawing:

  4. Unknown part (not in tracker): adds a line to the alert digest. Doesn't move the file (no home for it).
  5. Same rev as tracker: silent no-op. Just a resend.
  6. Older rev than tracker: adds a line to the alert noting an old rev arrived; doesn't apply.
  7. Newer rev (the real case): finds existing PDFs in the workflow's Drive folder, renames each {part_number}_rev{old_rev}_archived_{date}.pdf, moves them to the Superseded folder. Uploads the new PDF as {part_number}_Rev{new_rev}.pdf to the workflow's folder. Updates the tracker row: new rev, today's date. Emails the alert recipient with old rev, new rev, customer, Drive links, and an explicit "verify production isn't running the old rev" note. Finally, applies drawing-processed label and removes drawing-update.

Sample alert email

Subject: DRAWING REV CHANGE: ACME-12345 Rev B → Rev C

A new drawing revision has arrived for an active part.

Part number:   ACME-12345
Description:   Hydraulic mount bracket
Customer:      Acme Aerospace
Old rev:       B
New rev:       C
Filename:      ACME-12345_C.pdf
New drawing:   https://drive.google.com/file/d/.../view

Old drawing(s) archived to the Superseded folder:
  - ACME-12345_revB_archived_2026-05-12.pdf (id 1xyz...)

VERIFY production isn't running the old rev. If parts have already
been made to B, contact the customer before continuing.

— Acme Manufacturing drawing-rev-watcher

Customization

Edge cases

Scenario Behavior
Email arrives with a PDF that's a spec, not a drawing AI marks is_drawing: false; act task logs SKIP.
Email has multiple PDFs, one drawing + one cover letter AI processes each; only the drawing affects the tracker.
Customer resends the SAME rev Tracker compares; logs NO CHANGE; no archive, no alert.
Customer sends an OLDER rev by mistake Tracker compares; logs OLDER REV; no archive, no alert applied. Manual action needed if you actually want to roll back.
Part number isn't in the tracker Logs UNKNOWN PART; alerts owner once via the standard summary. The PDF stays in the email; not moved.
pdftotext fails (scanned drawing, non-text PDF) AI receives empty text; classifies as low confidence or is_drawing: false. Manual review needed. Future: add OCR fallback.
Multiple emails arriving in the same 10-min window Workflow processes one per run. A flurry of 5 simultaneous rev emails takes 50 min to clear at the 10-min cadence; adjust the schedule if your shop sees bursts.

Companion workflows

Verified

gog gmail messages search/get/attachment, drive ls/rename/move/upload, sheets get/update, and gmail messages modify flag/command syntax all confirmed against the bundled gog v0.19.0 (2026-06-01); re-verify the --plain TSV output shapes on first run. pdftotext confirmed on PATH. The AI classification step uses the standard anthropic tool with the verified claude-sonnet-4-6 model identifier.

Source

See workflow.iml.

AI provider

Any supported AI provider works here. This template ships configured for the anthropic tool; swap that task's tool to anthropic, openai, gemini, mistral, ollama or openrouter to use the provider you already have, and point its credential at your own key. The step is a plain summarise/classify call — nothing in it is vendor specific. See requires.ai in the manifest.