Skip to content

Building Workflows

This guide walks through building a complete workflow in FloImg Studio.

Drag a Generate node onto the canvas. This creates your base image.

Click the node to configure:

Generator: quickchart
Type: bar
Data: [configure your chart data]

The preview panel shows your chart in real-time.

Drag Transform nodes and connect them to your generator.

Example pipeline:

Generate (chart) → Resize (800px) → Convert (WebP)

Connect nodes by dragging from the output port (right side) to the input port (left side).

Add an Output node to save or export:

Output Type: File
Path: ./charts/monthly-report.webp

Click Run to execute the entire pipeline. The result appears in the output node’s preview.

Let’s build a complete sales chart workflow:

  1. Drag “Generate” node to canvas
  2. Select generator: quickchart
  3. Configure:
    • Type: bar
    • Labels: ["Q1", "Q2", "Q3", "Q4"]
    • Data: [12000, 19000, 15000, 25000]
    • Background color: #7c3aed
  1. Drag “Transform” node
  2. Connect to generator output
  3. Configure:
    • Operation: resize
    • Width: 800
    • Height: 600
  1. Drag another “Transform” node
  2. Connect to resize output
  3. Configure:
    • Operation: convert
    • Format: webp
    • Quality: 85
  1. Drag “Output” node
  2. Connect to convert output
  3. Configure:
    • Path: ./sales-chart.webp

Click Run. Your chart is generated, resized, converted, and saved.

One generator can feed multiple transform chains:

→ Resize (thumb) → Output (thumbnail.png)
Generate (QR)
→ Resize (large) → Output (full.png)

Use Switch nodes to route based on parameters:

Generate → Switch (format) → [PNG path]
→ [WebP path]

Click Export → JSON to get a workflow file:

{
"nodes": [
{
"id": "gen-1",
"type": "generate",
"generator": "quickchart",
"params": { ... }
},
{
"id": "transform-1",
"type": "transform",
"op": "resize",
"params": { "width": 800 }
}
],
"edges": [
{ "from": "gen-1", "to": "transform-1" }
]
}

Use this with the CLI:

Terminal window
floimg generate workflow.json -o output.png

Click Export → TypeScript for SDK code:

const floimg = createClient();
floimg.registerGenerator(quickchart());
let image = await floimg.generate({
generator: 'quickchart',
params: { ... }
});
image = await floimg.transform(image, {
op: 'resize',
params: { width: 800 }
});
await floimg.save(image, './output.png');