Yep, familiar with the approach and while functionally equivalent, it requires an external service. This is also possible and quite efficient with Firebase Cloud Functions (the free tier is generous).
Ya’ know how Coda supports inbound webhooks? It’s a near-real-time event model that is able to receive arbitrary data and apply those messages/data payloads in near real-time to Coda documents, tables, etc. Well, imagine I need to do the opposite without moving my data through another service that invariably introduces additional latency, complexity, security issues, and most of all, configuration effort, maintenance, etc. This approach is also complexified by laws and regulations concerning multi-tenant data spaces (the compliance paperwork for security alone is significant for enterprises).
I think the tech stack to accomplish things from simply hosting an SVG for internal Coda use to exposing Coda-as-a-Service (CaaS), must be integral to Coda itself, otherwise, the proxy (i.e., FCF or GAS) will need to make call-backs into Coda using its API, and that creates a whole “host” of additional friction and costs not the least of which is added latency.
We live in a real-time world; humans are discontent when we fail to achieve responsiveness above the Doherty Threshold. As such, outbound webhooks or localized transformations need to avoid latency even for the simplest ideas like Mermaid and Itsy(). But, I think the question of CaaS is a much bigger idea capable of transforming how micro services are built and maintained.
I’ve had some success building a Pack that exposes Coda data over a sockets-service, thus making it possible to publish a real-time data feed of changes in Coda. Packs may include Node libraries and SDKs designed to interface with services like PubNub. At Stream It, this has allowed us to create a proxy API into a Coda document - you just listen for events on the channel in any external application (even Firebase Cloud Functions) and you will see all the activity exposed by the Pack in less than 250ms globally.
This approach negates the need for REST APIs and many of the security and latency issues associated with a traditional API and/or proxy hosting capabilities. Ideally - perhaps on the distant horizon - Coda will integrate an accessible sockets-layer for Pack developers.