{
  "name": "Batch Currency Converter",
  "description": "Convert currency with live rates. Fetches the latest USD exchange rates and works out what 100 USD is worth in euros.",
  "tags": [
    "currency",
    "exchange rates",
    "conversion",
    "usd",
    "eur",
    "finance"
  ],
  "type": "triggered",
  "nodes": [
    {
      "id": "sticky-intro",
      "position": {
        "x": 20,
        "y": 20
      },
      "data": {
        "color": "#fff266",
        "content": "💱 Convert currency with live rates.\n\nThis flow fetches today's USD exchange rates and works out the euro value of 100 USD. No account needed. Change the amount or target currency in the math step below.",
        "runned": false,
        "wasRunned": false,
        "skipped": false,
        "failed": false,
        "isRunning": false
      },
      "type": "stickyNote",
      "width": 360,
      "height": 180,
      "measured": {
        "width": 360,
        "height": 180
      },
      "selected": false
    },
    {
      "id": "trigger-run",
      "position": {
        "x": 100,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:trigger:whenStarted"
        },
        "label": "Run now",
        "inputs": {},
        "parameters": {
          "notes": "Starts the workflow when you press Run."
        },
        "runned": false,
        "wasRunned": false,
        "skipped": false,
        "failed": false,
        "isRunning": false
      },
      "type": "trigger",
      "measured": {
        "width": 50,
        "height": 50
      }
    },
    {
      "id": "fetch-rates",
      "position": {
        "x": 420,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:httpRequest"
        },
        "label": "Fetch exchange rates",
        "inputs": {
          "method": "GET",
          "url": "https://api.exchangerate.host/latest?base=USD"
        },
        "parameters": {
          "notes": "Gets the latest rates with USD as the base currency."
        },
        "runned": false,
        "wasRunned": false,
        "skipped": false,
        "failed": false,
        "isRunning": false
      },
      "type": "basic",
      "measured": {
        "width": 50,
        "height": 50
      },
      "selected": false
    },
    {
      "id": "convert",
      "position": {
        "x": 740,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:math"
        },
        "label": "100 USD in EUR",
        "inputs": {
          "operation": "multiply",
          "value": "{{ $input.data.rates.EUR }}",
          "operand": 100,
          "outputFieldName": "eur_for_100usd"
        },
        "parameters": {
          "notes": "Multiplies the EUR rate by 100. UNVERIFIED: the rates field path — adjust '$input.data.rates.EUR' to match the API response shape."
        },
        "runned": false,
        "wasRunned": false,
        "skipped": false,
        "failed": false,
        "isRunning": false
      },
      "type": "basic",
      "measured": {
        "width": 50,
        "height": 50
      },
      "selected": false
    },
    {
      "id": "show-result",
      "position": {
        "x": 1060,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:displayObjectNode"
        },
        "label": "Show conversion",
        "inputs": {
          "title": "Conversion"
        },
        "parameters": {
          "notes": "Displays the converted amount."
        },
        "runned": false,
        "wasRunned": false,
        "skipped": false,
        "failed": false,
        "isRunning": false
      },
      "type": "basic",
      "measured": {
        "width": 50,
        "height": 50
      }
    },
    {
      "id": "a4fa8663-ddef-41c4-94f9-5fed8b9a3c43",
      "type": "stickyNote",
      "position": {
        "x": 654.5,
        "y": 65
      },
      "data": {
        "content": "You need to:\n- have an access Key, \n- save it as a credential\n- then connect it in the **Authentication** field of `Fetch exchange rates`",
        "color": "#ff66cc",
        "isRunning": false,
        "runned": false,
        "wasRunned": false,
        "skipped": false,
        "failed": false
      },
      "origin": [
        0.5,
        0
      ],
      "measured": {
        "width": 469,
        "height": 134
      },
      "selected": true,
      "dragging": false
    }
  ],
  "edges": [
    {
      "id": "e-run-fetch",
      "type": "flowEdge",
      "source": "trigger-run",
      "target": "fetch-rates",
      "markerEnd": {
        "type": "arrowclosed"
      }
    },
    {
      "id": "e-fetch-convert",
      "type": "flowEdge",
      "source": "fetch-rates",
      "target": "convert",
      "markerEnd": {
        "type": "arrowclosed"
      }
    },
    {
      "id": "e-convert-show",
      "type": "flowEdge",
      "source": "convert",
      "target": "show-result",
      "markerEnd": {
        "type": "arrowclosed"
      }
    }
  ]
}