{
 "name": "[노드 한 장] Aggregate · Steam 할인 10개 → 메시지 1통",
 "nodes": [
  {
   "id": "b1",
   "name": "Run manually",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    0
   ],
   "parameters": {}
  },
  {
   "id": "b2",
   "name": "Get Steam specials",
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "position": [
    240,
    0
   ],
   "parameters": {
    "url": "https://store.steampowered.com/api/featuredcategories?cc=us&l=english",
    "options": {}
   }
  },
  {
   "id": "b3",
   "name": "Split into games",
   "type": "n8n-nodes-base.splitOut",
   "typeVersion": 1,
   "position": [
    480,
    0
   ],
   "parameters": {
    "fieldToSplitOut": "specials.items",
    "options": {}
   }
  },
  {
   "id": "b4",
   "name": "Aggregate",
   "type": "n8n-nodes-base.aggregate",
   "typeVersion": 1,
   "position": [
    720,
    0
   ],
   "parameters": {
    "fieldsToAggregate": {
     "fieldToAggregate": [
      {
       "fieldToAggregate": "name"
      },
      {
       "fieldToAggregate": "discount_percent"
      }
     ]
    },
    "options": {}
   }
  },
  {
   "id": "b5",
   "name": "Write one message",
   "type": "n8n-nodes-base.set",
   "typeVersion": 3.4,
   "position": [
    960,
    0
   ],
   "parameters": {
    "assignments": {
     "assignments": [
      {
       "id": "m1",
       "name": "games",
       "type": "number",
       "value": "={{ $json.name.length }}"
      },
      {
       "id": "m2",
       "name": "message",
       "type": "string",
       "value": "=오늘 Steam 할인 {{ $json.name.length }}개\n{{ $json.name.map((n,i)=>`${i+1}. ${n} -${$json.discount_percent[i]}%`).join('\\n') }}"
      }
     ]
    },
    "options": {}
   }
  }
 ],
 "connections": {
  "Run manually": {
   "main": [
    [
     {
      "node": "Get Steam specials",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Get Steam specials": {
   "main": [
    [
     {
      "node": "Split into games",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Split into games": {
   "main": [
    [
     {
      "node": "Aggregate",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Aggregate": {
   "main": [
    [
     {
      "node": "Write one message",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "timezone": "Asia/Seoul",
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false,
  "source": "datapopcorn.ai/workflow/nodes"
 }
}