{
  "name": "Shopify G\u00f6rsel G\u00fcncelleyici (prototipal) copy",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -340,
        540
      ],
      "id": "03c7d91c-56e1-4172-935d-59431aa1bff7",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "a94ac81a-16ca-4aca-b82e-9a6d651443cf",
              "leftValue": "={{ $json.tags }}",
              "rightValue": "yenilendi",
              "operator": {
                "type": "string",
                "operation": "notContains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1320,
        540
      ],
      "id": "4befd8f7-b341-4afc-935a-31a813f7e1e5",
      "name": "Filter"
    },
    {
      "parameters": {
        "batchSize": "=1",
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1580,
        640
      ],
      "id": "d0a07c81-ecac-48aa-8a3b-98dc4057a4bd",
      "name": "Loop Over Items"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "name": "Replace Me",
      "typeVersion": 1,
      "position": [
        3460,
        940
      ],
      "id": "48c57941-f10a-4699-a17a-8df9a209f36b"
    },
    {
      "parameters": {
        "url": "=https://api.prototipal.com/functions/v1/request-tracker/status/{{ $json.external_request_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Prototipal API Key'] }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2280,
        700
      ],
      "id": "c044b273-aeb6-4a56-ad44-f095f9dcaab3",
      "name": "Durum Kontrol\u00fc"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2060,
        700
      ],
      "id": "44a7f0fb-306e-48a6-8599-3d382f1093b6",
      "name": "Wait"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "2dc06c60-eae5-4880-93e2-068c6e3a3d6e",
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2480,
        700
      ],
      "id": "a2ab8ce6-e913-482a-ac1a-4e4ada2f7938",
      "name": "If"
    },
    {
      "parameters": {
        "amount": 4
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2680,
        880
      ],
      "id": "61e1dd8a-8411-405d-8dc6-b85a43d5a3be",
      "name": "Wait1"
    },
    {
      "parameters": {
        "url": "=https://api.prototipal.com/functions/v1/request-tracker/response/{{ $('\u00dcretim \u0130ste\u011fi').item.json.external_request_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Prototipal API Key'] }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2780,
        660
      ],
      "id": "a0a5a139-cbe6-427e-b1c2-41a22991b317",
      "name": "G\u00f6rseli Al"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "972f0ee2-00dc-4b54-9e41-fd3c7e906391",
              "name": "Ma\u011faza \u0130smi",
              "value": "",
              "type": "string"
            },
            {
              "id": "84a878c9-a5db-4dc6-93e1-45a2af734bb6",
              "name": "Shopify Access Token",
              "value": "",
              "type": "string"
            },
            {
              "id": "c303ab0b-5da4-471b-b126-a7032bb802e9",
              "name": "Prototipal API Key",
              "value": "",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        140,
        540
      ],
      "id": "cee6aa5d-d8b4-4beb-95db-1a8cc63b3cd2",
      "name": "De\u011fi\u015fkenler"
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=https://{{ $('De\u011fi\u015fkenler').item.json['Ma\u011faza \u0130smi'] }}.myshopify.com/admin/api/2023-04/products/{{ $('Loop Over Items').item.json.id }}.json ",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Shopify-Access-Token",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Shopify Access Token'] }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={    \"product\": {      \n  \n  \"id\": {{ $('Loop Over Items').item.json.id }},      \n  \n  \"tags\": \"{{ $('Loop Over Items').item.json.tags }},yenilendi\"    }} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3620,
        660
      ],
      "id": "784cb43f-a6c5-48fb-9070-980fe98104d4",
      "name": "\"yenilendi\" Tag\u0131 Ekle"
    },
    {
      "parameters": {
        "url": "=https://{{ $json['Ma\u011faza \u0130smi'] }}.myshopify.com/admin/api/2023-10/products.json ",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "collection_id"
            },
            {
              "name": "fields",
              "value": "id,tags,images"
            },
            {
              "name": "limit",
              "value": "250"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Shopify-Access-Token",
              "value": "={{ $json['Shopify Access Token'] }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        700,
        540
      ],
      "id": "d664fce3-6f6f-4a01-a4d9-896dd4f3a411",
      "name": "\u00dcr\u00fcnleri \u00c7ek"
    },
    {
      "parameters": {
        "fieldToSplitOut": "products",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1080,
        540
      ],
      "id": "09810f7c-95f3-4638-90ab-db744e32770c",
      "name": "Split Out"
    },
    {
      "parameters": {
        "content": "## Kurulum\n\n1-De\u011fi\u015fkenler b\u00f6l\u00fcm\u00fcne \u00e7ift t\u0131klay\u0131n.\n\n2-Ma\u011faza ismi de\u011ferine myshopify urlnizin ilk k\u0131sm\u0131n\u0131 yaz\u0131n. \u00d6rne\u011fin vch2q.myshopify.com i\u00e7in bu de\u011fer \"vch2q\"dur.\n\n3-Shopify Access Token yerine shopifydan ald\u0131\u011f\u0131n\u0131z anahtar\u0131 girin. Verilmesi gereken izinler \u015funlard\u0131r;\n\nread products,write product, read orders, write orders\n\n4-Prototipal API Key de\u011ferine ise api anahtar\u0131n\u0131 girin.\n\n5-Sadece \"De\u011fi\u015fkenler\" mod\u00fcl\u00fcn\u00fc g\u00fcncellemeniz ve e\u011fer koleksiyon bazl\u0131 i\u015flem yapacaksan\u0131z \"\u00dcr\u00fcnleri \u00c7ek\" mod\u00fcl\u00fcne koleksiyon ID'sini yap\u0131\u015ft\u0131rman\u0131z yeterlidir. Otomasyondaki di\u011fer k\u0131s\u0131mlara m\u00fcdahele etmenize gerek yoktur.",
        "height": 760,
        "width": 380
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "7eb3192f-41d4-4d7c-a4fe-4b25976a0c26",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## \u00d6NEML\u0130 NOT!\n\nShopify API hakk\u0131nda bilinmesi gereken, tek seferde maksimum 250 \u00fcr\u00fcn \u00e7ekilebilece\u011fi. Shopify daha fazlas\u0131na m\u00fcsaade etmiyor.\n\nE\u011fer 250'den fazla \u00fcr\u00fcn varsa koleksiyonlara b\u00f6lerek her koleksiyonu ayr\u0131 i\u015fleme almak mant\u0131kl\u0131 olacakt\u0131r.\n\nShopifyda koleksiyon sayfan\u0131za gidiniz. Url \u015fu \u015fekilde g\u00f6r\u00fcnecektir;\n\nhttps://admin.shopify.com/store/xxxx-xx/collections/322213904569\n\nBurdaki \"322213904569\" koleksiyon numaran\u0131z. Bu numaray\u0131 \"\u00dcr\u00fcnleri \u00c7ek\" mod\u00fcl\u00fc i\u00e7erisindeki \"collection_id\" de\u011ferine yap\u0131\u015ft\u0131r\u0131n\u0131z. Bunu yap\u0131nca bu otomasyon yaln\u0131zca o koleksiyondakiler i\u00e7in \u00e7al\u0131\u015facakt\u0131r. \n\nE\u011fer bu \u00f6zelli\u011fi kullanmaz istemezseniz \"collection_id\" de\u011ferini bo\u015f b\u0131rak\u0131n\u0131z.",
        "height": 720,
        "width": 420
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        0
      ],
      "typeVersion": 1,
      "id": "599fe7da-79b0-4a62-a76f-59fdb07a8aa3",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.prototipal.com/functions/v1/predict",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "x-api-key",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Prototipal API Key'] }}"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "={{ $json.images[0].src }}"
            },
            {
              "name": "type",
              "value": "shopify-image-updater"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1840,
        700
      ],
      "id": "e1c15325-35f1-4fbe-90c1-a56556c6879d",
      "name": "\u00dcretim \u0130ste\u011fi"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://{{ $('De\u011fi\u015fkenler').item.json['Ma\u011faza \u0130smi'] }}.myshopify.com/admin/api/2023-04/products/{{ $('Loop Over Items').item.json.id }}/images.json",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Shopify-Access-Token",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Shopify Access Token'] }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"image\": {\n    \"src\": \"{{ $json.gorsel_1[0].url }}\",\n    \"position\": 1\n  }\n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3000,
        660
      ],
      "id": "baa8a34a-89e4-40f0-80f3-950691105d19",
      "name": "G\u00f6rsel 1 \u00dcr\u00fcne Ekle"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://{{ $('De\u011fi\u015fkenler').item.json['Ma\u011faza \u0130smi'] }}.myshopify.com/admin/api/2023-04/products/{{ $('Loop Over Items').item.json.id }}/images.json",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Shopify-Access-Token",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Shopify Access Token'] }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"image\": {\n    \"src\": \"{{ $('G\u00f6rseli Al').item.json.gorsel_2[0].url }}\",\n    \"position\": 2\n  }\n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3200,
        660
      ],
      "id": "8bfe086f-8b09-4977-a7c2-ab1035aaec5f",
      "name": "G\u00f6rsel 2 \u00dcr\u00fcne Ekle"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://{{ $('De\u011fi\u015fkenler').item.json['Ma\u011faza \u0130smi'] }}.myshopify.com/admin/api/2023-04/products/{{ $('Loop Over Items').item.json.id }}/images.json",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Shopify-Access-Token",
              "value": "={{ $('De\u011fi\u015fkenler').item.json['Shopify Access Token'] }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"image\": {\n    \"src\": \"{{ $('G\u00f6rseli Al').item.json.gorsel_3[0].url }}\",\n    \"position\": 3\n  }\n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3400,
        660
      ],
      "id": "b449da39-3949-4d0e-80c8-abeb4b085edf",
      "name": "G\u00f6rsel 3 \u00dcr\u00fcne Ekle"
    },
    {
      "parameters": {
        "content": "## NOT \n\n### \u00a0\"yenilendi\" etiketine sahip olmayan \u00fcr\u00fcnler i\u015flenir.\n\n### Otomasyon sonunda i\u015flnenen \u00fcr\u00fcne \"yenilendir\" etiketi eklenir. Bu sayede sonraki \u00e7al\u0131\u015ft\u0131rmalarda tekrara d\u00fc\u015f\u00fclmez.",
        "height": 180,
        "width": 560,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        860
      ],
      "typeVersion": 1,
      "id": "4e8c5267-7010-4517-adfa-074914764205",
      "name": "Sticky Note2"
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "De\u011fi\u015fkenler",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "\u00dcretim \u0130ste\u011fi",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Durum Kontrol\u00fc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Durum Kontrol\u00fc": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "G\u00f6rseli Al",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Durum Kontrol\u00fc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "G\u00f6rseli Al": {
      "main": [
        [
          {
            "node": "G\u00f6rsel 1 \u00dcr\u00fcne Ekle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "De\u011fi\u015fkenler": {
      "main": [
        [
          {
            "node": "\u00dcr\u00fcnleri \u00c7ek",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\"yenilendi\" Tag\u0131 Ekle": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00dcr\u00fcnleri \u00c7ek": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00dcretim \u0130ste\u011fi": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "G\u00f6rsel 1 \u00dcr\u00fcne Ekle": {
      "main": [
        [
          {
            "node": "G\u00f6rsel 2 \u00dcr\u00fcne Ekle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "G\u00f6rsel 2 \u00dcr\u00fcne Ekle": {
      "main": [
        [
          {
            "node": "G\u00f6rsel 3 \u00dcr\u00fcne Ekle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "G\u00f6rsel 3 \u00dcr\u00fcne Ekle": {
      "main": [
        [
          {
            "node": "\"yenilendi\" Tag\u0131 Ekle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "dc1b6e92-0f9f-4f43-8831-99a4a3c58197",
  "id": "IBxgLDiAnz6OKm3W",
  "tags": []
}