{
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * *"
            },
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ],
      "id": "c4a0fa89-50be-426c-8159-c4efdb6e6123",
      "name": "Every day at 9 AM"
    },
    {
      "parameters": {
        "operation": "amazon",
        "url": "https://www.amazon.com/dp/B09468VZ5W"
      },
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "typeVersion": 1,
      "position": [
        240,
        -208
      ],
      "id": "a1111111-0000-0000-0000-000000000001",
      "name": "Check product 1",
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "11110000-0000-0000-0000-0000000000a1",
              "name": "name",
              "value": "={{ $json.results[0].content.results.title }}",
              "type": "string"
            },
            {
              "id": "11110000-0000-0000-0000-0000000000a2",
              "name": "url",
              "value": "={{ $json.results[0].content.results.url }}",
              "type": "string"
            },
            {
              "id": "11110000-0000-0000-0000-0000000000a3",
              "name": "stock",
              "value": "={{ $json.results[0].content.results.stock }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        -208
      ],
      "id": "b1111111-0000-0000-0000-000000000001",
      "name": "Normalize 1"
    },
    {
      "parameters": {
        "operation": "amazon",
        "url": "https://www.amazon.com/dp/B0CMX38QZF"
      },
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "typeVersion": 1,
      "position": [
        240,
        0
      ],
      "id": "a2222222-0000-0000-0000-000000000002",
      "name": "Check product 2",
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "22220000-0000-0000-0000-0000000000b1",
              "name": "name",
              "value": "={{ $json.results[0].content.results.title }}",
              "type": "string"
            },
            {
              "id": "22220000-0000-0000-0000-0000000000b2",
              "name": "url",
              "value": "={{ $json.results[0].content.results.url }}",
              "type": "string"
            },
            {
              "id": "22220000-0000-0000-0000-0000000000b3",
              "name": "stock",
              "value": "={{ $json.results[0].content.results.stock }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        0
      ],
      "id": "b2222222-0000-0000-0000-000000000002",
      "name": "Normalize 2"
    },
    {
      "parameters": {
        "operation": "amazon",
        "url": "https://www.amazon.com/dp/B0D1KVS785"
      },
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "typeVersion": 1,
      "position": [
        240,
        208
      ],
      "id": "a3333333-0000-0000-0000-000000000003",
      "name": "Check product 3",
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "33330000-0000-0000-0000-0000000000c1",
              "name": "name",
              "value": "={{ $json.results[0].content.results.title }}",
              "type": "string"
            },
            {
              "id": "33330000-0000-0000-0000-0000000000c2",
              "name": "url",
              "value": "={{ $json.results[0].content.results.url }}",
              "type": "string"
            },
            {
              "id": "33330000-0000-0000-0000-0000000000c3",
              "name": "stock",
              "value": "={{ $json.results[0].content.results.stock }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        208
      ],
      "id": "b3333333-0000-0000-0000-000000000003",
      "name": "Normalize 3"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        680,
        0
      ],
      "id": "c0000000-0000-0000-0000-0000000000d0",
      "name": "Combine products"
    },
    {
      "parameters": {
        "operation": "removeItemsSeenInPreviousExecutions",
        "dedupeValue": "={{ $json.url }}|{{ $json.stock }}",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        900,
        0
      ],
      "id": "d0000000-0000-0000-0000-0000000000e0",
      "name": "Only new status (cross-run)"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "e0000000-0000-0000-0000-0000000000f1",
              "leftValue": "={{ ($json.stock || '').toLowerCase().includes('in stock') }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1120,
        0
      ],
      "id": "e0000000-0000-0000-0000-0000000000f0",
      "name": "In stock?"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#random",
          "mode": "name"
        },
        "text": "=\u2705 Back in stock!\n{{ $json.name }}\n{{ $json.url }}",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.4,
      "position": [
        1340,
        0
      ],
      "id": "f0000000-0000-0000-0000-000000000100",
      "name": "Back-in-stock alert",
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Every day at 9 AM": {
      "main": [
        [
          {
            "node": "Check product 1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check product 2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check product 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check product 1": {
      "main": [
        [
          {
            "node": "Normalize 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize 1": {
      "main": [
        [
          {
            "node": "Combine products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check product 2": {
      "main": [
        [
          {
            "node": "Normalize 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize 2": {
      "main": [
        [
          {
            "node": "Combine products",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Check product 3": {
      "main": [
        [
          {
            "node": "Normalize 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize 3": {
      "main": [
        [
          {
            "node": "Combine products",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Combine products": {
      "main": [
        [
          {
            "node": "Only new status (cross-run)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only new status (cross-run)": {
      "main": [
        [
          {
            "node": "In stock?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "In stock?": {
      "main": [
        [
          {
            "node": "Back-in-stock alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}