{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Audit trail — hash, log, inspect",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Signed contract",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "docId": "CTR-2026-014",
          "body": "This agreement is made between Acme and Globex…"
        }
      },
      "position": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "hash",
      "type": "utility.crypto",
      "label": "Fingerprint",
      "category": "utility",
      "config": {
        "operation": "hash",
        "algorithm": "sha256",
        "encoding": "hex",
        "inputField": "body",
        "outputField": "sha256"
      },
      "position": {
        "x": 530,
        "y": 0
      }
    },
    {
      "id": "log",
      "type": "utility.log",
      "label": "Audit log",
      "category": "utility",
      "config": {
        "level": "info",
        "message": "audit: {{ $json.docId }} sealed as {{ $json.sha256 }}"
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    },
    {
      "id": "peek",
      "type": "utility.inspect",
      "label": "Inspect",
      "category": "utility",
      "config": {
        "note": "full envelope after sealing"
      },
      "position": {
        "x": 1590,
        "y": 0
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Audit line",
      "category": "utility",
      "config": {
        "message": "sealed {{ $json.docId }} → {{ $json.sha256 }}"
      },
      "position": {
        "x": 2120,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "hash",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "hash",
      "sourcePort": "output",
      "targetNodeId": "log",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "log",
      "sourcePort": "output",
      "targetNodeId": "peek",
      "targetPort": "input"
    },
    {
      "id": "e3",
      "sourceNodeId": "peek",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "A contract document gets a SHA-256 fingerprint for the audit trail, the event is logged at info level, and Inspect shows the full envelope mid-flow (open it while stepping a debug run)."
  }
}