Save an n8n draft to the shared register

Continue from the existing n8n guide. Replace its Data Table write with this Drafts write. Do not run two draft transfers or manual imports simultaneously. One Apps Script still owns Requests and Sources; n8n writes only Drafts.

  1. For the first run, select exactly one recorded inquiry. Before AI Agent add Edit Fields named Selected inquiry. Set request_id and source_key from the recorded rows, source_version from approved references, leave business state untouched. The validator reads DRAFT / SKIP / NEEDS_REVIEW from the agent output and stops if the state is missing or ambiguous. AI must not select identity. Confirm that the full thread loaded by the existing guide belongs to this source; stop if the relationship is unclear. Never retain a test identity for another customer.
  2. After AI Agent add three Google Sheets nodes named Read Requests, Read Sources, Read Settings. Use Get Row(s), the same Document and the Requests, Sources, Settings sheets, without filters. Enable Always Output Data in each node's Settings so an empty sheet reaches the validator as a visible failure. Preserve exact headers.
  3. Add Code, Run Once for All Items, and paste n8n-validate-draft.js. Keep node names exact. It validates the recorded inquiry, owner, original source, absence of a sent reply and reference version. Never hide a failure with Ignore.
  4. Add Google Sheets → Append or Update Row, same Document, Drafts sheet. Column to match on: Request ID. Map automatically by the Code output's exact column names, or map all seven fields manually. Write plain values (RAW / Let n8n format as available), not formulas. This replaces the draft for the inquiry, never its business state.
  5. Run one case manually and repeat: Drafts must still have one row. Change the reference version or fill Sent reply in Requests; Code must reject the write. Restore correct data before resuming a schedule. This step has no send tool and deliberately does not prepare later replies in an ongoing conversation.

This route handles one explicitly selected thread per run; never mix customer inputs. Set and verify Selected inquiry again for another inquiry. It does not automate deciding which job a new thread belongs to. A Drafts row does not establish delivery to a client. Reopen the live thread before sending; a check against an earlier snapshot cannot prevent a teammate's concurrent reply.