{
 "name": "[노드 한 장] HTTP Request · Steam Top Sellers → Google Sheets",
 "nodes": [
  {
   "id": "a1",
   "name": "Run manually",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    0
   ],
   "parameters": {}
  },
  {
   "id": "a2",
   "name": "Every Monday 9AM",
   "type": "n8n-nodes-base.scheduleTrigger",
   "typeVersion": 1.2,
   "position": [
    0,
    200
   ],
   "parameters": {
    "rule": {
     "interval": [
      {
       "field": "weeks",
       "triggerAtDay": [
        1
       ],
       "triggerAtHour": 9
      }
     ]
    }
   }
  },
  {
   "id": "a3",
   "name": "Get Steam top sellers",
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "position": [
    260,
    100
   ],
   "parameters": {
    "url": "https://store.steampowered.com/api/featuredcategories?cc=us&l=english",
    "options": {}
   }
  },
  {
   "id": "a4",
   "name": "Split into games",
   "type": "n8n-nodes-base.splitOut",
   "typeVersion": 1,
   "position": [
    500,
    100
   ],
   "parameters": {
    "fieldToSplitOut": "top_sellers.items",
    "options": {}
   }
  },
  {
   "id": "a5",
   "name": "Remove duplicates",
   "type": "n8n-nodes-base.removeDuplicates",
   "typeVersion": 2,
   "position": [
    740,
    100
   ],
   "parameters": {
    "compare": "selectedFields",
    "fieldsToCompare": "id",
    "options": {}
   }
  },
  {
   "id": "a6",
   "name": "Pick fields",
   "type": "n8n-nodes-base.set",
   "typeVersion": 3.4,
   "position": [
    980,
    100
   ],
   "parameters": {
    "assignments": {
     "assignments": [
      {
       "id": "f1",
       "name": "checked_at",
       "type": "string",
       "value": "={{ $now.setZone('Asia/Seoul').toFormat('yyyy-MM-dd HH:mm') }}"
      },
      {
       "id": "f2",
       "name": "rank",
       "type": "number",
       "value": "={{ $itemIndex + 1 }}"
      },
      {
       "id": "f3",
       "name": "name",
       "type": "string",
       "value": "={{ $json.name }}"
      },
      {
       "id": "f4",
       "name": "final_price_usd",
       "type": "number",
       "value": "={{ $json.final_price / 100 }}"
      },
      {
       "id": "f5",
       "name": "discount_percent",
       "type": "number",
       "value": "={{ $json.discount_percent }}"
      },
      {
       "id": "f6",
       "name": "original_price_usd",
       "type": "number",
       "value": "={{ ($json.original_price ?? $json.final_price) / 100 }}"
      },
      {
       "id": "f7",
       "name": "app_id",
       "type": "number",
       "value": "={{ $json.id }}"
      },
      {
       "id": "f8",
       "name": "url",
       "type": "string",
       "value": "=https://store.steampowered.com/app/{{ $json.id }}"
      }
     ]
    },
    "options": {}
   }
  },
  {
   "id": "a7",
   "name": "Save to Google Sheets",
   "type": "n8n-nodes-base.googleSheets",
   "typeVersion": 4.2,
   "position": [
    1220,
    100
   ],
   "parameters": {
    "operation": "append",
    "documentId": {
     "__rl": true,
     "mode": "id",
     "value": "YOUR_GOOGLE_SHEET_ID"
    },
    "sheetName": {
     "__rl": true,
     "mode": "id",
     "value": "gid=0"
    },
    "columns": {
     "mappingMode": "autoMapInputData",
     "value": {},
     "matchingColumns": [],
     "schema": []
    },
    "options": {}
   }
  }
 ],
 "connections": {
  "Run manually": {
   "main": [
    [
     {
      "node": "Get Steam top sellers",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Every Monday 9AM": {
   "main": [
    [
     {
      "node": "Get Steam top sellers",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Get Steam top sellers": {
   "main": [
    [
     {
      "node": "Split into games",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Split into games": {
   "main": [
    [
     {
      "node": "Remove duplicates",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Remove duplicates": {
   "main": [
    [
     {
      "node": "Pick fields",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Pick fields": {
   "main": [
    [
     {
      "node": "Save to Google Sheets",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "timezone": "Asia/Seoul",
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false,
  "source": "datapopcorn.ai/workflow/nodes"
 }
}