{
  "nodes": [
    {
      "id": "a30e02b0-b807-4a4c-b2a6-19bacf5f2f8f",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        800,
        180
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "558afdb5-7311-48f1-9464-01b6933eaffe",
      "name": "Get Meta BG",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1300,
        60
      ],
      "parameters": {
        "operation": "information"
      },
      "typeVersion": 1
    },
    {
      "id": "66bf1414-725b-40e3-be08-76f02a5d130f",
      "name": "Nest Top Meta",
      "type": "n8n-nodes-base.set",
      "position": [
        1480,
        320
      ],
      "parameters": {
        "options": {
          "includeBinary": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "2fb3fd91-c13d-45ce-a7ec-612319a008fc",
              "name": "metaTop",
              "type": "object",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "29e77ce2-15a0-47a8-8b1c-8f457ae435c6",
      "name": "Nest Bg Meta",
      "type": "n8n-nodes-base.set",
      "position": [
        1480,
        60
      ],
      "parameters": {
        "options": {
          "includeBinary": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "2fb3fd91-c13d-45ce-a7ec-612319a008fc",
              "name": "metaBg",
              "type": "object",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "dcdf4737-f881-4414-8fdb-1ce334e60093",
      "name": "Calculate Center",
      "type": "n8n-nodes-base.code",
      "position": [
        2280,
        180
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "\n\n  const centerX = ($input.item.json.metaBg.size.width + $input.item.json.metaTop.size.width) / 2;\n  const centerY = ($input.item.json.metaBg.size.height + $input.item.json.metaTop.size.height) / 2;\n\n  $input.item.json.center = { x: centerX, y: centerY };\n\nreturn $input.item"
      },
      "typeVersion": 2
    },
    {
      "id": "7b146616-cbc7-4e21-a899-46fdc8e5c914",
      "name": "Get Logo for the Watermark",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        320
      ],
      "parameters": {
        "url": "https://cloud.let-the-work-flow.com/workflow-data/logo-shadow.png",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "7167d1b8-f0c4-4068-b5c8-bb23d5a5a589",
      "name": "Get the Image for Background",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        60
      ],
      "parameters": {
        "url": "https://cloud.let-the-work-flow.com/workflow-data/robot-1.png",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "df6b4e01-76aa-42dd-bf1f-8eb259cd4079",
      "name": "Wait for both Images and merge Binary in one Item",
      "type": "n8n-nodes-base.merge",
      "position": [
        1980,
        180
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combinationMode": "mergeByPosition"
      },
      "typeVersion": 2.1
    },
    {
      "id": "d5161149-275c-4e2d-9d55-7f1c18716933",
      "name": "Rename Image Binary Top Image",
      "type": "n8n-nodes-base.code",
      "position": [
        1660,
        320
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "$input.item.binary.top = $input.item.binary.data;\ndelete $input.item.binary.data;\nreturn $input.item;"
      },
      "typeVersion": 2
    },
    {
      "id": "90b0e990-d330-4875-b492-28d52019784d",
      "name": "Rename Image Binary Background Image",
      "type": "n8n-nodes-base.code",
      "position": [
        1660,
        60
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "$input.item.binary.bg = $input.item.binary.data;\ndelete $input.item.binary.data;\nreturn $input.item;"
      },
      "typeVersion": 2
    },
    {
      "id": "a2b3eaa3-61bb-4e91-a225-b6a9b5dd725c",
      "name": "Get Meta Top",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1300,
        320
      ],
      "parameters": {
        "operation": "information"
      },
      "typeVersion": 1
    },
    {
      "id": "46b4e344-8ea6-4d87-9dc3-c3d80f17a9d5",
      "name": "Let \"top\" overlay \"bg\"",
      "type": "n8n-nodes-base.editImage",
      "position": [
        2600,
        180
      ],
      "parameters": {
        "options": {
          "format": "jpeg",
          "fileName": "out.png"
        },
        "operation": "composite",
        "positionX": "={{ $json.center.x - $json.metaTop.size.width }}",
        "positionY": "={{ $json.center.y - $json.metaTop.size.height }}",
        "dataPropertyName": "bg",
        "dataPropertyNameComposite": "top"
      },
      "typeVersion": 1
    },
    {
      "id": "ee7787f1-c717-416c-b076-18200e3109a0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        -69.74382694102701
      ],
      "parameters": {
        "width": 820.7320856852112,
        "height": 612.1135700636542,
        "content": "## \ubc30\uacbd \uc774\ubbf8\uc9c0\ub97c \uac00\uc838\uc624\uace0 \ud30c\uc77c\uc5d0\uc11c \uba54\ud0c0 \ub370\uc774\ud130\ub97c \uac00\uc838\uc624\uae30\n\n### \ud06c\uae30\uc640 \uac19\uc774, \"\uc0c1\ub2e8 \uc774\ubbf8\uc9c0\" \uc989 \"\uc6cc\ud130\ub9c8\ud06c\" \uc989 \"\uc624\ubc84\ub808\uc774\"\ub97c \"\ubc30\uacbd \uc774\ubbf8\uc9c0\" \uc704\uc5d0 \uc801\uc808\ud788 \ubc30\uce58\ud558\uae30 \uc704\ud574"
      },
      "typeVersion": 1
    },
    {
      "id": "80925b86-42dc-4cf9-8a3b-b8df913d4d8c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2180,
        60
      ],
      "parameters": {
        "width": 296.5141962579569,
        "height": 568.2663488290325,
        "content": "## \"Top\" \uc774\ubbf8\uc9c0\uc758 \uc704\uce58 \uacc4\uc0b0\n\n\uc6b0\ub9ac\ub294 \"Top\" \uc774\ubbf8\uc9c0\ub97c \"Background\" \uc774\ubbf8\uc9c0\uc758 \uc815\uc911\uc559\uc5d0 \ubc30\uce58\ud558\uace0 \uc2f6\uc2b5\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \uc791\uc5c5\uc758 \uc6d0\uc810\uc740 \uc0c1\ub2e8 \uc67c\ucabd \ubaa8\uc11c\ub9ac\uc785\ub2c8\ub2e4.\n\n\ud544\uc694\uc5d0 \ub530\ub77c \uc870\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, Overlay-Image\uc758 \ud06c\uae30\ub97c \uc870\uc815\ud558\uac70\ub098, \uc5b4\ub5a4 \ubaa8\uc11c\ub9ac\uc5d0 \ubc30\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Formular\uc744 \ud544\uc694\uc5d0 \ub9de\uac8c \uc870\uc815\ud558\uc138\uc694.\n\n**\u26a0\ufe0f \uc81c\ud55c:** Background-Image\ub97c \ub36e\ub294 \uc774\ubbf8\uc9c0\ub294 background image\uc758 \ud06c\uae30\ubcf4\ub2e4 \uc791\uac70\ub098 \uac19\uc544\uc57c \uc81c\ub300\ub85c \uc791\ub3d9\ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "89dafe6a-d49a-43f7-94d2-3c5de5b67c9f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2520,
        360
      ],
      "parameters": {
        "color": 4,
        "width": 257.68541919015513,
        "height": 99.86957475347333,
        "content": "### \ud83d\uddbc\ufe0f Binary Property *bg*\ub294 \uc774\uc81c \ud569\uc131 \uc774\ubbf8\uc9c0\uac00 \ub418\uc5b4\uc57c \ud558\uba70, *top*\uc5d0 \uc758\ud574 \uc624\ubc84\ub808\uc774\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "384bd626-fdbb-4073-ad9d-671b4aefe19e",
      "name": "Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        301.53703835383794,
        -60
      ],
      "parameters": {
        "width": 448.40729941128825,
        "height": 745.9248098393447,
        "content": "## \uc9c0\uce68\n\n\uc774 \uc790\ub3d9\ud654\ub294 `background` \uc774\ubbf8\uc9c0\ub97c \ub2e4\ub978 \uc774\ubbf8\uc9c0\uc640 \uacb9\uccd0\uc11c \uc6cc\ud130\ub9c8\ud06c\ub098 \ub85c\uace0\ub97c \uc27d\uac8c \ucd94\uac00\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n\uc774\ubbf8\uc9c0\uc5d0 \ub85c\uace0\uc758 \ud22c\uba85 \ubc84\uc804\uc744 \uacb9\uccd0 \uc6cc\ud130\ub9c8\ud06c\ub97c \ucd94\uac00\ud558\ub824\uba74 \uc774 \uc790\ub3d9\ud654\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub85c\uace0\ub97c \ud2b9\uc815 \ubaa8\uc11c\ub9ac\uc5d0 \ubc30\uce58\ud558\uace0 \uc2f6\ub2e4\uba74, \ucf54\ub4dc \ub178\ub4dc\uc5d0\uc11c \uc624\ubc84\ub808\uc774 \uc774\ubbf8\uc9c0\uc758 \uc704\uce58\ub97c \uc870\uc815\ud558\uc138\uc694.\n\n### \uc791\ub3d9 \uc6d0\ub9ac\n\n1. \ub450 \uc774\ubbf8\uc9c0\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uc5ec \uc774\uc9c4 \ud30c\uc77c\uc744 \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4 (\uc18c\uc2a4\ub97c \uc218\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4, \uadf8\ub798\ub3c4).\n2. \uac01 \uc774\ubbf8\uc9c0\uc758 \uba54\ud0c0\ub370\uc774\ud130\ub97c \ucd94\ucd9c\ud558\uc5ec, \uc8fc\ub85c \uac01 \uc774\ubbf8\uc9c0\uc758 \ud06c\uae30\uc5d0 \ucd08\uc810\uc744 \ub9de\ucda5\ub2c8\ub2e4.\n3. \uc624\ubc84\ub808\uc774 \uc774\ubbf8\uc9c0\uc758 \uc704\uce58\ub97c \uacc4\uc0b0\ud569\ub2c8\ub2e4 (\uae30\ubcf8\uac12: \ubc30\uacbd \uc774\ubbf8\uc9c0\uc758 \uc815\uc911\uc559).\n4. \ub450 \uc774\ubbf8\uc9c0\ub97c \ud569\uc131\ud569\ub2c8\ub2e4.\n\n### \uc81c\ud55c \uc0ac\ud56d \ubc0f \ucd5c\uc801\ud654 \uae30\ud68c\n\n1. \uc624\ubc84\ub808\uc774 \uc774\ubbf8\uc9c0\ub294 \ubc30\uacbd \uc774\ubbf8\uc9c0\uc640 \ub3d9\uc77c\ud558\uac70\ub098 \uc791\uc544\uc57c \uc81c\ub300\ub85c \uc815\ub82c\ub429\ub2c8\ub2e4.\n2. \uc624\ubc84\ub808\uc774 \uc774\ubbf8\uc9c0\ub294 \ubc30\uacbd \uc774\ubbf8\uc9c0\uc758 \ube44\uc728\uc5d0 \uc790\ub3d9\uc73c\ub85c \ub9de\uac8c \uc870\uc815\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\n![Image](https://cloud.let-the-work-flow.com/logo-64.png)  \n\uc6cc\ud06c\ud50c\ub85c\uc6b0\ub97c \uc990\uae30\uc138\uc694! \u2764\ufe0f  \n[\ub81b \ub354 \uc6cc\ud06c\ud50c\ub85c\uc6b0](https://let-the-work-flow.com) \u2014 \uc6cc\ud06c\ud50c\ub85c\uc6b0 \uc790\ub3d9\ud654 \ubc0f \uac1c\ubc1c"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Get Meta BG": {
      "main": [
        [
          {
            "node": "Nest Bg Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Meta Top": {
      "main": [
        [
          {
            "node": "Nest Top Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nest Bg Meta": {
      "main": [
        [
          {
            "node": "Rename Image Binary Background Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nest Top Meta": {
      "main": [
        [
          {
            "node": "Rename Image Binary Top Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Center": {
      "main": [
        [
          {
            "node": "Let \"top\" overlay \"bg\"",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Logo for the Watermark": {
      "main": [
        [
          {
            "node": "Get Meta Top",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the Image for Background": {
      "main": [
        [
          {
            "node": "Get Meta BG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename Image Binary Top Image": {
      "main": [
        [
          {
            "node": "Wait for both Images and merge Binary in one Item",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Get the Image for Background",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Logo for the Watermark",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename Image Binary Background Image": {
      "main": [
        [
          {
            "node": "Wait for both Images and merge Binary in one Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for both Images and merge Binary in one Item": {
      "main": [
        [
          {
            "node": "Calculate Center",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}