{
 "name": "[노드 한 장] 서브 워크플로우 · 환율 가져오기",
 "nodes": [
  {
   "id": "s1",
   "name": "When called by another workflow",
   "type": "n8n-nodes-base.executeWorkflowTrigger",
   "typeVersion": 1.1,
   "position": [
    0,
    0
   ],
   "parameters": {
    "inputSource": "workflowInputs",
    "workflowInputs": {
     "values": [
      {
       "name": "currency"
      }
     ]
    }
   }
  },
  {
   "id": "s2",
   "name": "Get exchange rate",
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "position": [
    240,
    0
   ],
   "parameters": {
    "url": "=https://open.er-api.com/v6/latest/{{ $json.currency }}",
    "options": {}
   }
  },
  {
   "id": "s3",
   "name": "Keep KRW rate",
   "type": "n8n-nodes-base.set",
   "typeVersion": 3.4,
   "position": [
    480,
    0
   ],
   "parameters": {
    "assignments": {
     "assignments": [
      {
       "id": "a1",
       "name": "currency",
       "type": "string",
       "value": "={{ $json.base_code }}"
      },
      {
       "id": "a2",
       "name": "krw",
       "type": "number",
       "value": "={{ Math.round($json.rates.KRW*100)/100 }}"
      },
      {
       "id": "a3",
       "name": "updated",
       "type": "string",
       "value": "={{ $json.time_last_update_utc }}"
      }
     ]
    },
    "options": {}
   }
  }
 ],
 "connections": {
  "When called by another workflow": {
   "main": [
    [
     {
      "node": "Get exchange rate",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Get exchange rate": {
   "main": [
    [
     {
      "node": "Keep KRW rate",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "timezone": "Asia/Seoul",
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false,
  "source": "datapopcorn.ai/workflow/nodes"
 }
}