Data connector: reads a single Firestore document (noun: document at project/collection/doc_id) on server-side render (verb: read) and publishes the deserialized result to window.A2UI_DATA[name]. Visual atoms subscribe via window.A2UI_CALLBACKS[name] — the named connector wires data to presentation without direct coupling. GAS surface fetches via Firestore REST API using ScriptApp.getOAuthToken(); requires the datastore OAuth scope in appsscript.json. Optional client-side refresh calls google.script.run.fetchFirestoreDoc() so the page stays live without a reload. Data shape is surface-agnostic — any visual atom can bind to the named feed.
| Field | Type | |
|---|---|---|
| name | string. Connector name — visual atoms subscribe via window.A2UI_CALLBACKS[name] (required). | required |
| project | string. GCP project ID that owns the Firestore database (required). | required |
| collection | string. Firestore collection name (required). | required |
| doc_id | string. Document ID within the collection (required). | required |
| refresh | integer. Client-side refresh interval seconds. 0 = initial load only. Default 0. | optional |
{
"type": "firestore_read",
"name": "Firestore Read",
"project": "my-project-id",
"collection": "users",
"doc_id": "Doc id"
}
{
"identifier": "urn:air:a2uicatalog.ai:atom:firestore_read",
"displayName": "Firestore Read",
"type": "application/vnd.a2ui.atom+json",
"url": "https://a2uicatalog.ai/atoms/firestore_read",
"capabilities": [
"apps-script-web"
],
"description": "Data connector: reads a single Firestore document (noun: document at project/collection/doc_id) on server-side render (verb: read) and publishes the deserialized result to window.A2UI_DATA[name]. Visual atoms subscribe via window.A2UI_CALLBACKS[name] \u2014 the named connector wires data to presentation without direct coupling. GAS surface fetches via Firestore REST API using ScriptApp.getOAuthToken(); requires the datastore OAuth scope in appsscript.json. Optional client-side refresh calls google.script.run.fetchFirestoreDoc() so the page stays live without a reload. Data shape is surface-agnostic \u2014 any visual atom can bind to the named feed.",
"representativeQueries": [
"show a Firestore document read \u2014 publishes deserialized doc to named data connector; visual atoms subscribe by name",
"data connector: reads a single firestore document (noun: document at project/collection/doc_id) on s",
"render a firestore read"
]
}
The renderer is open source. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.
git clone https://github.com/a2uicatalog/a2ui
cd apps-script-surface/gas-schema-renderer
clasp push && clasp deploy
Full deploy guide →