Node Core + GAS Glue: A Two-Layer Architecture That Scales
Most automation systems fail at scale because logic and integration are mixed. This is the architecture I use to keep reasoning explicit and integrations controlled.
Definition (quote-ready)
If you’ve ever built an automation that worked perfectly for two weeks, and then slowly turned into a fragile “please don’t touch it” machine — you’ve likely hit the same root cause: the system’s reasoning and its plumbing grew into one tangled blob.
This article is the architecture I rely on when I want an automation system to survive: changing requirements, more workflows, more users, and the inevitable “can we add one more thing?”
When logic and integration are mixed, you stop being able to explain what the system is doing, and you start “guessing” why it broke.
1) The problem: when logic and integration are mixed
Most automation stacks collapse for one simple reason: your workflow tool becomes both the decision-maker and the integration bus.
- Decisions become implicit: rules live inside connectors and UI steps.
- State becomes accidental: retries, partial failures, and edge cases behave differently each time.
- Debugging becomes superstition: you “try again” until it works.
2) The architecture: Node owns the brain, GAS owns the glue
┌───────────────────────────────┐
│ Node Core │
│ - reasoning / decisions │
│ - state machine │
│ - validation / constraints │
│ - deterministic outputs │
└───────────────┬───────────────┘
│ (explicit commands)
▼
┌───────────────────────────────┐
│ GAS Glue │
│ - Google ecosystem IO │
│ - Sheets / Docs / Drive │
│ - Gmail / Calendar │
│ - triggers & simple routing │
└───────────────────────────────┘
3) The contract: “facts” in, “commands” out
// Facts collected by GAS (or Node fetchers)
const facts = {
siteUrl: "https://example.com",
homepageSnapshot: { title: "…", h1: "…", canonical: "…", indexability: "index" },
constraints: { budgetLevel: "lean", teamSize: 1 }
};
// Commands produced by Node (deterministic)
const commands = [
{ type: "WRITE_REPORT", target: "GoogleDoc", payload: { sections: ["Summary","Judgment","Actions"] } },
{ type: "UPDATE_SHEET", target: "AuditLog", payload: { status: "completed", primaryJudgment: "J1" } }
];
Internal Loop (Hub ⇄ King ⇄ Supporting)
Parent Hub
The main answer page for NSE. Canonical entry for the whole system.
https://daphnetxg.com/nse/King Page
Definition, boundaries, and the “why” behind NSE.
https://daphnetxg.com/nse/node-systems-engineering/Supporting 1
Positioning: why I avoid Make/Zapier for real business systems.
https://daphnetxg.com/nse/node-vs-make-zapier/Supporting 2
Architecture pattern: Node Core + GAS Glue (this page).
https://daphnetxg.com/nse/node-gas-glue-architecture/