Apps Script example · 8 min read

Append 409A Valuation Audit Log Entries: Copy-Paste Apps Script Pattern

Working append 409a valuation audit log entries example in Apps Script—copy-paste code, common mistakes, and when to get it built professionally.

DriveAppManual409A

Prompt for FMV, class, and Drive report id, then append an auditable 409A valuation log row. The workbook becomes the system of record; Apps Script owns the joins and business rules so analysts are not pasting monthly formulas.

Entry point `append409aValuation` reads typed columns with SpreadsheetApp batch APIs. DriveApp is the primary service; Manual describes how you usually invoke it after authorization.

Keep thresholds (grace days, bands, alert emails, API keys) in Config cells or Script Properties so the same .gs file promotes from sandbox to production without code edits.

This page is technical only: sheet layout, edge cases, runnable code, deploy steps, and FAQs for append 409a valuation audit log entries. No consulting pitch—just the pattern you can paste and harden.

Need this built? Hire a Google Apps Script developer →

Sheet / project setup

TabColumnsNotes
Log409AEffective, Class, FMV, Url, FileId, User, AtAppend-only

What this script does

append409aValuation() prompt for FMV, class, and Drive report id, then append an auditable 409A valuation log row.

  • Ui.prompt inputs
  • Drive report link
  • Actor + timestamp

Prerequisites

Container-bound script on the workbook that contains the tabs in the setup table. Authorize DriveApp scopes on first run.

  • V8 runtime
  • Exact sheet names
  • Script timezone = ops timezone

Walkthrough

Ui.prompt for FMV/class/date/fileId, resolve Drive URL, append Log409A with actor email and timestamp.

Paste the code, set Config/Properties, run append409aValuation once, verify the output tab, then attach a Manual trigger.

Edge cases

Invalid Drive ids throw—catch in UI flows or validate file access before prompting staff.

Testing

Use a sandbox copy with 3–5 known rows. Compute expected outputs for append 409a valuation audit log entries offline, run append409aValuation, and diff the output tab including one intentional bad row.

Hardening

Add LockService around multi-sheet writes if triggers can overlap. Log run timestamps. Keep API keys and alert emails in PropertiesService—not in shared cells.

Variations

Fork ideas: filter to one business unit, change grain (daily→weekly), or POST a summary payload after append409aValuation succeeds.

Operations notes

Assign an owner for the output tab, document regenerate steps, and treat `append409aValuation` as source of truth over ad-hoc cell formulas.

Full code: append409aValuation()

Run append409aValuation when source tabs are current. Edit sheet names and Config/Properties first.

function append409aValuation(){
  const ui=SpreadsheetApp.getUi();
  const fmv=Number(ui.prompt('FMV per share').getResponseText());
  const cls=ui.prompt('Share class (e.g. Common)').getResponseText();
  const eff=ui.prompt('Effective date YYYY-MM-DD').getResponseText();
  const fileId=ui.prompt('Drive report file id').getResponseText();
  const file=DriveApp.getFileById(fileId.trim());
  const sh=SpreadsheetApp.getActive().getSheetByName('Log409A');
  sh.appendRow([new Date(eff), cls, fmv, file.getUrl(), fileId, Session.getActiveUser().getEmail(), new Date()]);
}
  1. Line 1: Entry point — bind triggers to append409aValuation.
  2. Line 2: Interactive prompts — run from the sheet UI, not headless triggers.
  3. Line 7: Drive file resolve/copy for artifacts.
  4. Line 5: Rename sheet constants before production.
  5. Line 6: Rename sheet constants before production.

Deploy this example

  1. 01

    Open Apps Script

    In the bound spreadsheet: Extensions → Apps Script. For standalone projects, create one at script.google.com and link your Sheet by ID.

  2. 02

    Paste and save

    Add a .gs file, paste the code below, rename constants at the top (sheet names, column letters, API property keys), then save.

  3. 03

    Authorize once

    Run the main function from the editor. Accept OAuth scopes when prompted — triggers cannot run until authorization succeeds once.

  4. 04

    Add the trigger

    Triggers → Add trigger → choose the handler function and event (time-driven, on edit, or on form submit). Delete test triggers before production.

Before you run: append 409a valuation audit log entries

  • 1Setup tabs exist with headers matching append409aValuation
  • 2Dry-run on a copy workbook
  • 3Timezone verified
  • 4DriveApp authorization completed
  • 5Output spot-checked against hand calc
  • 6Manual trigger added only after validation
  • 7Owners + alert recipients documented

Frequently asked questions

At minimum the tabs listed in the setup table for Append 409A Valuation Audit Log Entries. Output tabs may be cleared each run—do not store source-of-truth data there.

Run from the Apps Script editor for dry runs. Production usually uses a Manual trigger after OAuth succeeds once.

Invalid Drive ids throw—catch in UI flows or validate file access before prompting staff.

Per-cell calls burn quota and wall time. One read + one write keeps this pattern under the 6-minute execution cap longer.

PropertiesService (Script Properties) for API keys and alert inboxes. Config sheet is fine for non-secret thresholds.

Simple ratios maybe; append 409a valuation audit log entries needs joins, branching, or side effects (email/Docs/API) that Apps Script handles cleanly.

Keep the .gs in clasp/git. Avoid divergent copies of formulas on the output tab—regenerate from the script.

Related examples

Want this wired into your real workflow?

I adapt these patterns to your Sheet structure, APIs, and triggers — deployed in your Google account. Fixed-scope quotes from $500 · free 30-min consult · quote within 24 hours.