{
  "name": "Track changes of product prices",
  "nodes": [
    {
      "id": null,
      "name": "HTML Extract",
      "type": "n8n-nodes-base.htmlExtract",
      "position": [
        -220,
        -390
      ]
    },
    {
      "id": null,
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "position": [
        -1290,
        -390
      ]
    },
    {
      "id": null,
      "name": "getActualPrice",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        -20,
        -390
      ]
    },
    {
      "id": null,
      "name": "fetchWeb",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -410,
        -390
      ]
    },
    {
      "id": null,
      "name": "FunctionItem",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1020,
        -390
      ]
    },
    {
      "id": null,
      "name": "Write Binary File1",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        1850,
        -390
      ]
    },
    {
      "id": null,
      "name": "Move Binary Data1",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        1420,
        -390
      ]
    },
    {
      "id": null,
      "name": "IF1",
      "type": "n8n-nodes-base.if",
      "position": [
        550,
        -370
      ]
    },
    {
      "id": null,
      "name": "checkifexists",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        410,
        -370
      ]
    },
    {
      "id": null,
      "name": "IF3",
      "type": "n8n-nodes-base.if",
      "position": [
        680,
        110
      ]
    },
    {
      "id": null,
      "name": "SaveToFile",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        1650,
        110
      ]
    },
    {
      "id": null,
      "name": "JsonToBinary",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        1500,
        110
      ]
    },
    {
      "id": null,
      "name": "changeME",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        -830,
        -390
      ]
    },
    {
      "id": null,
      "name": "initItem",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        -620,
        -390
      ]
    },
    {
      "id": null,
      "name": "savedItems",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        850,
        -20
      ]
    },
    {
      "id": null,
      "name": "itemsToJSON",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        1020,
        -20
      ]
    },
    {
      "id": null,
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "position": [
        2190,
        -90
      ]
    },
    {
      "id": null,
      "name": "initItem1",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        -1060,
        -390
      ]
    },
    {
      "id": null,
      "name": "IF2",
      "type": "n8n-nodes-base.if",
      "position": [
        1850,
        110
      ]
    },
    {
      "id": null,
      "name": "updateSavedItems",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1350,
        110
      ]
    },
    {
      "id": null,
      "name": "updateSavedItems1",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1200,
        -20
      ]
    },
    {
      "id": null,
      "name": "cleanData",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -1290,
        -560
      ]
    },
    {
      "id": null,
      "name": "IF4",
      "type": "n8n-nodes-base.if",
      "position": [
        150,
        -390
      ]
    },
    {
      "id": null,
      "name": "NotifyBetterPrice",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1850,
        -90
      ]
    },
    {
      "id": null,
      "name": "NotifyIncorrectPrice",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        270,
        -690
      ]
    }
  ],
  "connections": {
    "IF": {
      "main": [
        [
          {
            "node": "changeME",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF1": {
      "main": [
        [
          {
            "node": "FunctionItem",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "IF3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF2": {
      "main": [
        [
          {
            "node": "NotifyBetterPrice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF3": {
      "main": [
        [
          {
            "node": "savedItems",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF4": {
      "main": [
        [
          {
            "node": "NotifyIncorrectPrice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "checkifexists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron": {
      "main": [
        [
          {
            "node": "initItem1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "changeME": {
      "main": [
        [
          {
            "node": "initItem",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fetchWeb": {
      "main": [
        [
          {
            "node": "HTML Extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "initItem": {
      "main": [
        [
          {
            "node": "fetchWeb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "initItem1": {
      "main": [
        [
          {
            "node": "changeME",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SaveToFile": {
      "main": [
        [
          {
            "node": "IF2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "savedItems": {
      "main": [
        [
          {
            "node": "itemsToJSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "itemsToJSON": {
      "main": [
        [
          {
            "node": "updateSavedItems1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FunctionItem": {
      "main": [
        [
          {
            "node": "Move Binary Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML Extract": {
      "main": [
        [
          {
            "node": "getActualPrice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JsonToBinary": {
      "main": [
        [
          {
            "node": "SaveToFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "checkifexists": {
      "main": [
        [
          {
            "node": "IF1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "getActualPrice": {
      "main": [
        [
          {
            "node": "IF4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "updateSavedItems": {
      "main": [
        [
          {
            "node": "JsonToBinary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move Binary Data1": {
      "main": [
        [
          {
            "node": "Write Binary File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NotifyBetterPrice": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "updateSavedItems1": {
      "main": [
        [
          {
            "node": "updateSavedItems",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Binary File1": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NotifyIncorrectPrice": {
      "main": [
        [
          {
            "node": "checkifexists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}