{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Revenue query — SQL (Postgres)",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Report month",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "params": [
            "2026-07"
          ]
        }
      },
      "position": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "q",
      "type": "storage.sql",
      "label": "Monthly revenue",
      "category": "io",
      "config": {
        "credentialId": "",
        "dialect": "postgres",
        "host": "127.0.0.1",
        "port": 5433,
        "database": "flowdromedemo",
        "user": "postgres",
        "password": "flowdromedemo",
        "tls": "disable",
        "query": "SELECT 3 AS orders, 1387.25 AS revenue, $1::text AS month",
        "params": [],
        "paramsField": "params",
        "rowLimit": 100,
        "timeoutMs": 15000
      },
      "position": {
        "x": 530,
        "y": 0
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Finance board",
      "category": "utility",
      "config": {
        "message": "revenue: {{ $json.rows }}"
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "q",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "q",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "A parameterized revenue query against Postgres (works for MySQL too — one dialect switch). Pre-wired for the docker one-liner in this description; point it at your warehouse to go live."
  }
}