Draw a Google Cloud event-processing diagram with Mermaid

Explain a Google Cloud upload-processing workflow with storage events, Pub/Sub, and a worker. Show delivery assumptions and keep deployment details explicit.

Updated November 19, 2026 · 2 min read

An event-processing diagram should explain what triggers work and what happens when delivery is repeated. Cloud service icons are useful, but they cannot carry those semantics on their own.

Consider a hypothetical upload service: a file arrives, an event enters a topic, and a worker creates a processed output. The diagram is an explanation of responsibilities, not a complete Google Cloud configuration.

Show the event path

flowchart LR
  Uploader[Uploader]
  Input[Cloud Storage input bucket]
  Topic[Pub/Sub topic]
  Subscription[Worker subscription]
  Worker[Processing service]
  Output[Cloud Storage output bucket]
  Ledger[(Processing ledger)]
  Uploader -->|upload object| Input
  Input -->|configured object notification| Topic
  Topic --> Subscription
  Subscription -->|deliver event| Worker
  Worker -->|record processing identity| Ledger
  Worker -->|write processed object| Output

The notification must be configured; drawing the arrow does not create the integration. See Cloud Storage Pub/Sub notification documentation for supported events and setup requirements.

The processing service could run on different compute products. Keep the role generic until the architecture has selected one. If it runs on Cloud Run, label that explicitly in the actual system diagram and describe the chosen subscription delivery path.

Make repeat delivery a visible design question

What identifies one unit of work: an object name, an object generation, or an application job ID? A file can change without its name changing. The deduplication policy needs to match the event and storage semantics the application relies on.

The ledger box makes the question visible. It does not prescribe an implementation. Decide when the record is written, how concurrent attempts are handled, and what a worker does after failing partway through output creation.

Do not imply a blanket exactly-once guarantee for the whole pipeline. Delivery options and application side effects are separate concerns. Use Pub/Sub's delivery guidance when defining the actual consumer behavior.

Separate logical and deployment views

This diagram omits project boundaries, regions, identity permissions, subscription settings, and retry configuration. That is acceptable for a logical explanation if the omissions are stated. A security or deployment review needs additional views or linked configuration.

Likewise, splitting input and output buckets is a choice in this example. Explain why your deployment uses that structure rather than presenting the illustration as a universal requirement.

Make the drawing readable

Place ingestion on the left, delivery in the middle, and processing outputs on the right. Put state used for coordination below the worker so it does not look like another event channel.

Flowgraph Studio's official Google Cloud icons can add recognizable symbols once the roles are settled. The Rich node builder in the editor finds them by name and writes the @icon: line for you; keep the text labels. The Templates page also has Google Cloud versions of serverless order processing, a static website, and streaming analytics. Export a static image for design review while retaining the Mermaid source for updates.

Try the model in Flowgraph Studio. If you need syntax help, the flowchart cheat sheet covers labels and grouping. A good final check is whether the reader can explain both the first delivery and a repeated delivery from the diagram and its notes.

More guides