Technical Narrative & Pipeline

How Flowmator Automates Google Flow

A transparent breakdown of how Flowmator interacts with the Chromium browser engine, Google Flow's ProseMirror editor, and client-side canvas states.

Interactive 6-Stage Pipeline

Click on any pipeline step to view actual code snippets and execution logic

3. Hardware-Level Dispatch

chrome.debugger (Protocol 1.3)
Click any step above to inspect architecture

Primary method attaches Chromium DevTools Protocol (CDP) to dispatch authentic isTrusted: true input events (Input.insertText, Input.dispatchKeyEvent) into ProseMirror. If CDP is unavailable, seamlessly falls back to in-page transaction dispatching.

Design Principle: Third-party web applications like Google Flow frequently modify their client-side DOM. Flowmator uses resilient multi-strategy selectors and hardware emulation rather than hard-coded script injections.
Verified Code Excerptscripts/sidepanel.js
// Chrome DevTools Protocol Dispatch
await chrome.debugger.sendCommand(target, "Input.insertText", {
  text: promptText
});
// Jitter delay (100-500ms) before Enter
await chrome.debugger.sendCommand(target, "Input.dispatchKeyEvent", {
  type: "rawKeyDown", windowsVirtualKeyCode: 13, key: "Enter"
});

Execution Lifecycle Steps

The journey of each prompt through Flowmator's verified execution loop

Step 01

Prompt Ingestion & Memory Structuring

Prompts entered via the sidepanel or uploaded via CSV are split by newlines or the @@@NEXT@@@ delimiter. Each entry is assigned a crypto.randomUUID() and stored in chrome.storage.local with attempts: 0 and status: 'pending'.

Step 02

Target Tab Validation & Active Lock Screen

Flowmator queries the active Chrome window to confirm the current tab matches labs.google or flow.google. If you navigate away to another site, the side panel activates a tactile Lock Screen overlay to prevent firing prompts onto unintended web pages.

Step 03

Pre-Dispatch Canvas State Snapshot

Before sending any keystroke, Flowmator inspects the Google Flow DOM in world: 'MAIN'. It indexes all existing image media-ids and counts any pre-existing error tiles. This snapshot serves as the baseline for the post-generation diff.

Step 04

Chromium DevTools Protocol Input Dispatch

Flowmator attaches chrome.debugger (v1.3) to dispatch authentic isTrusted: true input events directly into Google Flow's ProseMirror editor (KeyA, Backspace, Input.insertText, Enter). It incorporates a 100ms-500ms randomized human jitter delay before triggering the generation button.

Step 05

Canvas Tile Verification Polling Loop

Flowmator polls every 1.5 seconds for up to 90 seconds. If an image with natural dimensions > 150x150px and a new media-id appears, it is verified as completed. If a <flow-error-tile> appears, the error text is extracted and reported immediately.

Step 06

Rate-Limit Cool-off & Sequence Protection

If an error tile indicates temporary throttling, Flowmator enters a 12-second cool-off countdown to allow Google cloud allocations to reset. If max retries are exceeded, the Sequence Protector halts the queue and sounds a Web Audio chime.

Encountering an issue or DOM shift?

Use our diagnostic assistant to test tab validation and selector behavior.

Support & Diagnostics