{
  "name": "Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection",
  "nodes": [
    {
      "id": "0eacaccd-7ca0-493b-bcf6-60758b3b0f5e",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -960,
        -440
      ]
    },
    {
      "id": "b77cb27a-f72f-4e79-af4d-c128375b6aef",
      "name": "Get Rule Info",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        -140
      ]
    },
    {
      "id": "29b72aef-59f5-45f5-b81f-bb383b8817a7",
      "name": "Coupon Status",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        -140
      ]
    },
    {
      "id": "28dce2fb-11e4-4c4a-845c-17d68c857130",
      "name": "Post to Telegram1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        980,
        -160
      ]
    },
    {
      "id": "d1d70202-6b0e-4ce4-9820-c94109c758ad",
      "name": "Product Alert to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        980,
        40
      ]
    },
    {
      "id": "693d5ef4-0776-4401-97ff-bb49378a8c77",
      "name": "Init Database",
      "type": "n8n-nodes-base.mySql",
      "position": [
        -520,
        -440
      ]
    },
    {
      "id": "99ebf843-ecf6-46da-9f5b-fbbc242db19b",
      "name": "Fetch New Product",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -360,
        120
      ]
    },
    {
      "id": "f8b54b91-b743-4d3b-9637-2f769b46a48b",
      "name": "Get Product Info",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        120
      ]
    },
    {
      "id": "ef85ab97-027b-4fdd-b79c-c38b2795707e",
      "name": "Set Coupon as Posted",
      "type": "n8n-nodes-base.mySql",
      "position": [
        1260,
        -140
      ]
    },
    {
      "id": "6716f687-198b-4cff-8212-9e6789d597f9",
      "name": "Set Product as Posted",
      "type": "n8n-nodes-base.mySql",
      "position": [
        1260,
        100
      ]
    },
    {
      "id": "347f5828-f6f9-4d0e-9771-e9b3884c9a27",
      "name": "Get Latest Offer",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -360,
        -140
      ]
    },
    {
      "id": "4fcb066a-f4c8-4449-86d8-6f39513994ab",
      "name": "Product Message Format",
      "type": "n8n-nodes-base.code",
      "position": [
        680,
        120
      ]
    },
    {
      "id": "44e6392f-80b1-4a2b-8081-c0004ed3e0fa",
      "name": "Voucher Message Format",
      "type": "n8n-nodes-base.code",
      "position": [
        680,
        -140
      ]
    },
    {
      "id": "0bf1f58c-1b8d-43eb-a110-121e94d7e44a",
      "name": "New Voucher Entry",
      "type": "n8n-nodes-base.mySql",
      "position": [
        -160,
        -140
      ]
    },
    {
      "id": "d060693e-aed5-40cf-9a36-28bf84d96925",
      "name": "New Product Entry",
      "type": "n8n-nodes-base.mySql",
      "position": [
        -160,
        120
      ]
    },
    {
      "id": "ad3f87a5-a37a-4672-984b-5b8a510ea6a4",
      "name": "Product Status",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        120
      ]
    },
    {
      "id": "dceda5b3-9126-453b-bd6e-01f5ddbc8a60",
      "name": "Voucher to X",
      "type": "n8n-nodes-base.twitter",
      "position": [
        980,
        -340
      ]
    },
    {
      "id": "17e427ed-77f5-4d3c-a6cf-8937f955b9c0",
      "name": "Product X Post",
      "type": "n8n-nodes-base.twitter",
      "position": [
        980,
        260
      ]
    },
    {
      "id": "70972854-d872-4665-8971-217494646726",
      "name": "Voucher Duplication Protection",
      "type": "n8n-nodes-base.if",
      "position": [
        40,
        -140
      ]
    },
    {
      "id": "c3c88742-1e58-483d-95ee-4fef4fb69104",
      "name": "Product Duplication Protection",
      "type": "n8n-nodes-base.if",
      "position": [
        40,
        120
      ]
    },
    {
      "id": "458acf57-b472-4d4f-a609-4e9d2737c506",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        -400
      ],
      "parameters": {
        "width": 260,
        "height": 820,
        "content": "\n## Post to X & Telegram"
      }
    },
    {
      "id": "63f50109-8206-4da5-9429-46e89ef651aa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -220
      ],
      "parameters": {
        "width": 220,
        "height": 480,
        "content": "## Record as Posted "
      }
    },
    {
      "id": "769d34f1-5b3a-41ff-8dc6-9a658eccd52f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -500
      ],
      "parameters": {
        "width": 700,
        "height": 240,
        "content": "## Auto Schedule Trigger & Initialise DB"
      }
    },
    {
      "id": "d37f209e-5fa7-46be-8e72-5d1c3757be59",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -220
      ],
      "parameters": {
        "width": null,
        "height": 500,
        "content": "## Format Messages"
      }
    },
    {
      "id": "c9c618af-1ba3-4c82-a629-8cf0b1a84c9f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -220
      ],
      "parameters": {
        "width": 1040,
        "height": 240,
        "content": "                    ## Magento 2 - Checks for Latest Voucher - Record in Database - Validates"
      }
    },
    {
      "id": "d9399795-e4ff-4590-bd37-3901beb1aee5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        40
      ],
      "parameters": {
        "width": 1040,
        "height": 240,
        "content": "                          ## Magento 2 - Checks for New Product - Record in Database - Validates"
      }
    },
    {
      "id": "1d1624e4-cdc1-4b50-886d-cefc118259cf",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -500
      ],
      "parameters": {
        "width": 660,
        "height": 240,
        "content": "## Magento 2 (Adobe Commerce): Automated X & Telegram Posting for New Products and Vouchers \n\n## - This Automation Comes with Duplicate Prevention"
      }
    }
  ],
  "connections": {
    "Voucher to X": {
      "main": [
        [
          {
            "node": "Set Coupon as Posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Coupon Status": {
      "main": [
        [
          {
            "node": "Voucher Message Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Rule Info": {
      "main": [
        [
          {
            "node": "Coupon Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Status": {
      "main": [
        [
          {
            "node": "Product Message Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product X Post": {
      "main": [
        [
          {
            "node": "Set Product as Posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Latest Offer": {
      "main": [
        [
          {
            "node": "New Voucher Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Product Info": {
      "main": [
        [
          {
            "node": "Product Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Latest Offer",
            "type": "main",
            "index": 0
          },
          {
            "node": "Init Database",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch New Product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch New Product": {
      "main": [
        [
          {
            "node": "New Product Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Product Entry": {
      "main": [
        [
          {
            "node": "Product Duplication Protection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Voucher Entry": {
      "main": [
        [
          {
            "node": "Voucher Duplication Protection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Telegram1": {
      "main": [
        [
          {
            "node": "Set Coupon as Posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Message Format": {
      "main": [
        [
          {
            "node": "Product Alert to Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Product X Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Voucher Message Format": {
      "main": [
        [
          {
            "node": "Post to Telegram1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Voucher to X",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Alert to Telegram": {
      "main": [
        [
          {
            "node": "Set Product as Posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Duplication Protection": {
      "main": [
        [],
        [
          {
            "node": "Get Product Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Voucher Duplication Protection": {
      "main": [
        [],
        [
          {
            "node": "Get Rule Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}