Abstract
This paper presents a serverless architecture that overcomes the stateless nature and 6-minute execution limit of Google Apps Script (GAS). By configuring a 1-second immediate timeout in UrlFetchApp loopback calls, an orchestrator dispatches background tasks and terminates immediately. This design frees up the caller's execution quota while the target Web App runs to completion in an isolated container. Combined with a transactional Google Sheets state machine, this design supports self-perpetuating parallel MapReduce runs and multi-turn, state-hydrated generative AI agent networks without external compute infrastructure.
Introduction
Google Apps Script (GAS) is the premier low-code platform for integrating, automating, and extending Google Workspace Ref. While universally accessible and free, GAS is constrained by strict runtime limits—most notably a hard 6-minute execution cap per script instance and a synchronous, stateless container lifecycle Ref.
Although the compilation shift to the V8 engine significantly reduced processing costs, handling large-scale ETL pipelines, parallel computations, or multi-agent generative AI simulations remains highly challenging. Traditional workarounds, such as time-driven triggers, suffer from high initialization latency, trigger omissions, and strict platform quotas.






