Automation scripts supporting the Finding Their Names (FTN) dataset, a project of the University of Georgia Libraries' Hargrett Rare Book and Manuscript Library. FTN documents enslaved and formerly enslaved persons drawn from archival collections, for publication on Enslaved.org as part of the Journal of Slavery and Data Preservation.
These scripts run inside Airtable Automations (Script step) and keep the base's core tables - Person Table, Event Table, Source Table, Place Table, and the Age Junction Table - in sync as records are created, linked, and unlinked.
- Person Table - named individuals (enslaved, free, enslavers, etc.)
- Event Table - discrete events (sales, births, appraisals, etc.)
- Source Table - archival source documents
- Place Table - locations associated with events
- Age Junction Table - junction table linking Person ↔ Event (many-to-many, used to track age-at-event)
Keeps the Age Junction Table in sync with the People ↔ Event links on the Event Table (and Person Table, if triggered from that side). Compares currently-linked records against existing junction rows, creates missing junction rows, and deletes orphaned ones - without duplicating or dropping valid links.
- Trigger: record updated in Event Table (or Person Table)
- Input variables:
sourceTableName,recordId
Derives and maintains indirect (reciprocal) links across the base whenever an Event record's Source, Place, or People links change:
-
Source ↔ Place (via shared Events)
-
Person ↔ Source (via a person's Events)
-
Source ↔ People (derived, optional - toggle with
UPDATE_SOURCE_PEOPLE) -
Trigger: record updated in Event Table
-
Input variables:
recordId
Deletes orphaned junction rows in the Age Junction Table (rows missing a valid link on either side).
- Trigger: record updated in Age Junction Table
- Input variables:
recordId ⚠️ Setup note: The automation's trigger conditions must combine "missing Event link" and "missing Person link" with AND logic, not OR. OR logic causes junction rows to be deleted prematurely - beforereciprocal-link-associator.jsfinishes writing both sides of a newly created link.
- All three automations must be scoped to trigger on a Grid view, not a personal view. Automations scoped to personal views do not fire reliably.
- Table and field names in the
CONFIGblocks at the top of each script must match your base exactly - update them if you duplicate this base or rename fields.
- A record is created or a link field is edited on the Event Table.
junction-sync.jsreconciles the Age Junction Table against the Event's People links.reciprocal-link-associator.jsrecomputes derived Source ↔ Place and Person ↔ Source links from the updated Event links.- If a junction row becomes orphaned during this process,
ghost-record-cleanup.jsremoves it once trigger conditions (AND logic) confirm it's truly orphaned.
Maintained by Srija Vuppula, Graduate Research Assistant, UGA Special Collections Libraries.