{
  "name": "Shopify to Google Sheets Product Sync Automation",
  "nodes": [
    {
      "id": "b2a5a0ac-4ce8-4d81-8d7f-01c0e5e35fd7",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1520,
        380
      ]
    },
    {
      "id": "681361ff-0648-46bd-bff2-2f4c4c17624a",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1620,
        180
      ]
    },
    {
      "id": "1836d799-a821-44c0-b1a7-7d9354afccd4",
      "name": "Shopify get products",
      "type": "n8n-nodes-base.graphql",
      "position": [
        320,
        200
      ]
    },
    {
      "id": "32a79711-c802-44c8-b188-250a782633c0",
      "name": "Split output",
      "type": "n8n-nodes-base.code",
      "position": [
        760,
        200
      ]
    },
    {
      "id": "c7457a0b-9381-4e96-a458-33bf43f2dce1",
      "name": "Check if there is next page",
      "type": "n8n-nodes-base.if",
      "position": [
        1300,
        200
      ]
    },
    {
      "id": "cced491b-b8b5-4109-8bd0-3d51fe0f0b5a",
      "name": "writing first product details",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -140,
        380
      ]
    },
    {
      "id": "a72b4230-d242-4ffa-a388-fb3580e66300",
      "name": "Set cursor",
      "type": "n8n-nodes-base.set",
      "position": [
        1420,
        740
      ]
    },
    {
      "id": "55a6cb5d-96d0-4577-b74f-d718de9d07cb",
      "name": "writing remaning product info to google sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1020,
        200
      ]
    },
    {
      "id": "a24c4e2a-482f-43d4-8c48-927427a430c0",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1300,
        520
      ]
    },
    {
      "id": "3a9d27fa-0840-4fc1-9b67-aad2f89f479b",
      "name": "update Curser",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        640,
        0
      ]
    },
    {
      "id": "a7c1f97c-d88f-457d-9213-36300d277f4b",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -540,
        520
      ]
    },
    {
      "id": "23f62f9c-ef85-4e25-9d94-83a1d899ecf8",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        100,
        540
      ]
    },
    {
      "id": "f1262f15-757f-4cc2-9453-fed17ad66b56",
      "name": "BatchSize",
      "type": "n8n-nodes-base.set",
      "position": [
        -1080,
        520
      ]
    },
    {
      "id": "e885b0e7-e435-40ae-be21-77fd992c3114",
      "name": "LastCursor",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -720,
        520
      ]
    },
    {
      "id": "ae3cf866-8695-4b63-b631-a6b00e29c7cb",
      "name": "shopify-initial",
      "type": "n8n-nodes-base.graphql",
      "position": [
        -300,
        380
      ]
    },
    {
      "id": "8aab80ca-1a54-4d02-a8e8-37d037a12132",
      "name": "Check cursor is not empty",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        20
      ]
    },
    {
      "id": "9e7c2e36-71f6-4fdf-a3b9-8aa3bf02d09b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        -400
      ],
      "parameters": {
        "width": 352.8896103896103,
        "height": 295.09740259740255,
        "content": "This workflow automates the synchronization of product data from a Shopify store to a Google Sheets document, ensuring seamless management and tracking. It retrieves product details such as title, tag"
      }
    },
    {
      "id": "fbf62e09-3598-4f5c-b83a-a8b3e5371afb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1420,
        340
      ],
      "parameters": {
        "width": 262.2077922077919,
        "height": 343.21428571428567,
        "content": "Schedule Trigger: Sets the timing for the automation to run, ensuring regular updates. Currently set to trigger every day at 7:00 AM"
      }
    },
    {
      "id": "47abe6ba-a7de-410e-b634-8ad248ec7155",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1140,
        360
      ],
      "parameters": {
        "width": 275.1623376623376,
        "height": 411.6883116883117,
        "content": "BatchSize: Defines the number of products to fetch from Shopify at a time, optimizing data retrieval. Currently set to 100, but it can be adjusted to a maximum of 250 for a single run"
      }
    },
    {
      "id": "6415976b-5fa5-4cd4-aa86-58eb9749a878",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        260
      ],
      "parameters": {
        "width": 275.16233766233773,
        "height": 419.0909090909093,
        "content": "LastCursor: Checks if the last cursor data is already present in Google Sheets to facilitate incremental data fetching. This ensures that the synchronization process does not start from the beginning "
      }
    },
    {
      "id": "6a15e240-111e-4c7d-a865-2484a7a6ff0c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -160
      ],
      "parameters": {
        "width": 450.9740259740258,
        "height": 705.941558441558,
        "content": "Shopify-initial: Fetches the initial set of products from the Shopify store to start the synchronization process. This node will only run once if there is no cursor found in the previous node, which r"
      }
    },
    {
      "id": "71640487-d3cf-4ede-8677-093108770720",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        560
      ],
      "parameters": {
        "width": 416.49350649350646,
        "height": 402.4350649350655,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis code node merges data from different sources (BatchSize, LastCursor, and Shopify-initial) to ensure the synchronization process starts efficiently and picks up where it left "
      }
    },
    {
      "id": "a13069b8-36f9-4604-895e-55c51ae3be2c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        200
      ],
      "parameters": {
        "width": 304.7727272727272,
        "height": 330.2597402597403,
        "content": "\n\n\n\n\n\n\n\n\n\nThe \"Split output\" node acts as a bridge between data retrieval and subsequent processing nodes. Since the Shopify node fetches batches of 100 results at a time, this node splits those batch"
      }
    },
    {
      "id": "8c1401ad-e7be-47a9-b01d-3606b9f20bf0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        620
      ],
      "parameters": {
        "width": 388.0519480519479,
        "height": 367.27272727272714,
        "content": "Set cursor: Updates the cursor for the next page of products to fetch from Shopify."
      }
    },
    {
      "id": "a5d3c62c-1bf3-4bc7-9e2b-1b5883b385d1",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32.17532467532425,
        20
      ],
      "parameters": {
        "width": 428.7662337662332,
        "height": 342.79220779220765,
        "content": "The GraphQL query within this node is crafted to extract essential product details such as title, description, tags, and price. This query can be customized to fetch additional product information as "
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "shopify-initial",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Shopify get products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Set cursor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BatchSize": {
      "main": [
        [
          {
            "node": "LastCursor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LastCursor": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set cursor": {
      "main": [
        [
          {
            "node": "Shopify get products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split output": {
      "main": [
        [
          {
            "node": "writing remaning product info to google sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "shopify-initial": {
      "main": [
        [
          {
            "node": "writing first product details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "BatchSize",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shopify get products": {
      "main": [
        [
          {
            "node": "Split output",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check cursor is not empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check cursor is not empty": {
      "main": [
        [
          {
            "node": "update Curser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if there is next page": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "writing first product details": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "writing remaning product info to google sheets": {
      "main": [
        [
          {
            "node": "Check if there is next page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}