{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "30da4d86-83ef-4226-ad2e-d73f531bd4ed",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bd57625d-03f2-48b3-94b5-2653214682eb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        -280
      ],
      "parameters": {
        "height": 440,
        "content": "## \uc8fc\ubb38 \uc774\ud589\uc744 \uc704\ud55c \ud544\ud130\ub9c1 \ud83d\udc47  \n\uc720\ud6a8\ud55c \uc8fc\ubb38\uc744 \ud504\ub85c\uadf8\ub7a8\uc801\uc73c\ub85c \uc774\ud589\uc744 \uc704\ud574 \ud544\ud130\ub9c1\ud558\uc138\uc694  \n\n- \ub2f9\uc2e0\uc774 \ub3c5\uc810\uc801\uc73c\ub85c \ub514\uc9c0\ud138 \ub2e4\uc6b4\ub85c\ub4dc\ub098 \ub514\uc9c0\ud138 \uae30\ud504\ud2b8 \uce74\ub4dc\ub97c \ud310\ub9e4\ud558\ub294 \uacbd\uc6b0  \n- \ub2f9\uc2e0\uc774 \ubaa8\ub4e0 \uc81c\ud488\uc5d0 \ub300\ud574 \uc774\ud589 \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0"
      },
      "typeVersion": 1
    },
    {
      "id": "5928c16f-b842-42e3-9c81-ac9b796d22ff",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1060,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "4509fb4e-fed0-4424-94a2-55d1c56a5d5a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        -180
      ],
      "parameters": {
        "height": 340,
        "content": "## \uc774\ud589 \uc8fc\ubb38 \uac00\uc838\uc624\uae30 \ud83d\udc47  \n[\ud2b9\uc815 \uc8fc\ubb38\uc5d0 \ub300\ud55c \uc774\ud589 \uc8fc\ubb38 \ubaa9\ub85d\uc744 \uac00\uc838\uc635\ub2c8\ub2e4.](https://shopify.dev/docs/api/admin-rest/2025-01/resources/fulfillmentorder#get-orders-order-id-fulfillment-orders)"
      },
      "typeVersion": 1
    },
    {
      "id": "76e16b42-01a3-4c88-a64b-a408b4bb9f40",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        -160
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1835c0d1-c7d3-4db6-b898-d604c8df7ad1",
      "name": "Filter Orders",
      "type": "n8n-nodes-base.filter",
      "position": [
        760,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3fdde26b-82ef-42f1-ba36-d4fe667f8866",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ (new Date().getTime() - new Date($json.created_at).getTime()) / (1000 * 60 * 60) }}\n",
              "rightValue": 24
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "977c3b8d-e3a9-4146-bc4c-e06e67f26a9e",
      "name": "Get Fulfillment Orders",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        20
      ],
      "parameters": {
        "url": "=https://{{ $('Set Global').item.json['store-id'] }}.myshopify.com/admin/api/2025-01/orders/{{ $json.id }}/fulfillment_orders.json",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "shopifyAccessTokenApi"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cf4c99c4-882c-4706-9cb9-8c154549545b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -180
      ],
      "parameters": {
        "width": 232,
        "height": 346,
        "content": "## \uc774 \ub178\ub4dc\ub97c \ud3b8\uc9d1\ud558\uc138\uc694 \ud83d\udc47\n\n\ub2f9\uc2e0\uc758 \uc2a4\ud1a0\uc5b4 ID\ub97c \uac00\uc838\uc640\uc11c GET URL\uc5d0\uc11c \uad50\uccb4\ud558\uc138\uc694."
      },
      "typeVersion": 1
    },
    {
      "id": "3a33e89b-ecf5-4be1-b3e4-9c20c00c7c1c",
      "name": "Set Global",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "78289fb1-8a1a-46a2-973e-f5f2a7309993",
              "name": "store-id",
              "type": "string",
              "value": "{store-id}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "68dffeba-705c-42b5-851e-893964a51176",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -180
      ],
      "parameters": {
        "width": 232,
        "height": 346,
        "content": "## \uc774\ud589 \uc0dd\uc131  \ud83d\udc47\n\n[\ud558\ub098 \ub610\ub294 \uc5ec\ub7ec \uc774\ud589 \uc8fc\ubb38\uc5d0 \ub300\ud55c \uc774\ud589\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4](https://shopify.dev/docs/api/admin-rest/2025-04/resources/fulfillment#post-fulfillments)  \n- `notify_customer` \uace0\uac1d\uc5d0\uac8c \uc54c\ub9bc\uc744 \ubcf4\ub0b4\uae30 \uc704\ud574"
      },
      "typeVersion": 1
    },
    {
      "id": "24137672-00d7-4fa0-9238-f2dca7900adf",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -300
      ],
      "parameters": {
        "width": 372,
        "height": 546,
        "content": "## n8n\uc744 \uc0ac\uc6a9\ud55c Shopify \uc774\ud589 \uc790\ub3d9\ud654\nShopify \uc0c1\uc810 \uc18c\uc720\uc790\ub4e4\ub85c, \uc804\uccb4 \uc8fc\ubb38\uc774\ub098 \ud2b9\uc815 \uc81c\ud488(\uc608: \uac1c\uc778\ud654 \uc544\uc774\ud15c)\uc5d0 \ub300\ud55c \uc774\ud589 \uacfc\uc815\uc744 \uc790\ub3d9\ud654\ud558\uace0 \uc2f6\uc5b4\ud558\ub294 \uc0ac\ub78c\ub4e4. \uadf8\ub7ec\ub098, [Fulfillment Order ID](https://shopify.dev/docs/api/admin-rest/2025-01/resources/fulfillmentorder#get-orders-order-id-fulfillment-orders) (\uc544\ub2cc [Order ID](https://shopify.dev/docs/api/admin-rest/2025-01/resources/order#get-orders-order-id?fields=id,line-items,name,total-price))\ub97c \uac80\uc0c9\ud558\ub294 \ub370 \uc5b4\ub824\uc6c0\uc774 \uc788\uc2b5\ub2c8\ub2e4\u2014\uc774\ud589\uc744 \ud2b8\ub9ac\uac70\ud558\ub294 \ub370 \ud544\uc694\ud55c \uc911\uc694\ud55c \ubd80\ubd84\uc785\ub2c8\ub2e4.\n\n\uc774 n8n \uc6cc\ud06c\ud50c\ub85c\uc6b0\ub294 \ub2e4\uc74c\uc744 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:\n\n- Shopify \uc0c1\uc810\uc5d0\uc11c \ubaa8\ub4e0 \uc774\ud589\ub418\uc9c0 \uc54a\uc740 \uc8fc\ubb38\uc744 \uac00\uc838\uc635\ub2c8\ub2e4.\n\n- Fulfillment Order ID\ub97c \uac80\uc0c9\ud569\ub2c8\ub2e4 (\"List Fulfillment Orders\" \uc791\uc5c5 \uc0ac\uc6a9).\n\n- \uc774\ud589 \uc694\uccad\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4 (\"Mark fulfillment orders as fulfilled\" \uc0ac\uc6a9).\n\n- \uc5d0\uc9c0 \ucf00\uc774\uc2a4\ub97c \ucc98\ub9ac\ud569\ub2c8\ub2e4, \uc608\ub97c \ub4e4\uc5b4 \ubd80\ubd84\uc801\uc73c\ub85c \uc774\ud589\ub41c \uc8fc\ubb38\uc774\ub098 API \uc751\ub2f5 \uc624\ub958."
      },
      "typeVersion": 1
    },
    {
      "id": "bfb340f2-1fb6-4be7-823a-d24d6d8361be",
      "name": "Get all Unfulfilled orders",
      "type": "n8n-nodes-base.shopify",
      "position": [
        540,
        0
      ],
      "parameters": {
        "options": {
          "fulfillmentStatus": "unfulfilled"
        },
        "operation": "getAll",
        "returnAll": true,
        "authentication": "accessToken"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8350fcaf-1bf8-4af1-a716-816b19a4b892",
      "name": "Mark fulfillment orders as fulfilled",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1740,
        20
      ],
      "parameters": {
        "url": "=https://{{ $('Set Global').item.json['store-id'] }}.myshopify.com/admin/api/2025-01/fulfillments.json",
        "method": "POST",
        "options": {},
        "jsonBody": "={\"fulfillment\":{\"line_items_by_fulfillment_order\":[{\"fulfillment_order_id\":{{ $json.fulfillment_orders[0].id }}}],\"notify_customer\":true}}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "shopifyAccessTokenApi"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "connections": {
    "Set Global": {
      "main": [
        [
          {
            "node": "Get all Unfulfilled orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Orders": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get Fulfillment Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Global",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Fulfillment Orders": {
      "main": [
        [
          {
            "node": "Mark fulfillment orders as fulfilled",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all Unfulfilled orders": {
      "main": [
        [
          {
            "node": "Filter Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Set Global",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark fulfillment orders as fulfilled": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}