{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Report drop — write, scan, read",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Report content",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "daily": "revenue: $4,120",
          "weekly": "revenue: $28,900"
        }
      },
      "position": {
        "x": 0,
        "y": 23
      }
    },
    {
      "id": "w1",
      "type": "storage.write-file",
      "label": "Write daily",
      "category": "io",
      "config": {
        "path": "./node-demos-data/daily.txt",
        "contentMode": "text",
        "inputField": "daily",
        "append": false,
        "createDirs": true,
        "encoding": "utf8"
      },
      "position": {
        "x": 530,
        "y": 23
      }
    },
    {
      "id": "w2",
      "type": "storage.write-file",
      "label": "Write weekly",
      "category": "io",
      "config": {
        "path": "./node-demos-data/weekly.txt",
        "contentMode": "text",
        "inputField": "weekly",
        "append": false,
        "createDirs": true,
        "encoding": "utf8"
      },
      "position": {
        "x": 1060,
        "y": 23
      }
    },
    {
      "id": "scan",
      "type": "input.directory-scan",
      "label": "Scan drop folder",
      "category": "io",
      "config": {
        "path": "./node-demos-data",
        "pattern": "*.txt",
        "recursive": false,
        "includeFileContents": false,
        "contentEncoding": "utf8"
      },
      "position": {
        "x": 1590,
        "y": 23
      }
    },
    {
      "id": "read",
      "type": "input.read-file",
      "label": "Read daily",
      "category": "io",
      "config": {
        "path": "./node-demos-data/daily.txt",
        "contentType": "auto",
        "encoding": "utf8"
      },
      "position": {
        "x": 2120,
        "y": 0
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Report feed",
      "category": "utility",
      "config": {
        "message": "daily report says: {{ $json.data }}"
      },
      "position": {
        "x": 2650,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "w1",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "w1",
      "sourcePort": "output",
      "targetNodeId": "w2",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "w2",
      "sourcePort": "output",
      "targetNodeId": "scan",
      "targetPort": "input"
    },
    {
      "id": "e3",
      "sourceNodeId": "scan",
      "sourcePort": "output",
      "targetNodeId": "read",
      "targetPort": "input"
    },
    {
      "id": "e4",
      "sourceNodeId": "read",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "The file trio on one flow: write two reports into ./node-demos-data, scan the folder for *.txt, and read one back — the drop-folder pattern behind most batch feeds."
  }
}