{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "db247af8-ae34-439b-a4ea-8ccc8950ad7c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d1f8e127-621e-4054-b547-be2a32e4f16e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        368
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "aae92991-376b-4252-ae1d-8e1ff86d1df8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        720
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d88aef89-5579-4d2e-b3a8-b84bff0186a0",
      "name": "Update a post",
      "type": "n8n-nodes-base.wordpress",
      "disabled": true,
      "position": [
        2160,
        1168
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "03818d71-aa1d-4381-b22b-d71427c4e395",
      "name": "Fetch Products from WooCommerce",
      "type": "n8n-nodes-base.httpRequest",
      "maxTries": 5,
      "position": [
        128,
        144
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "efb0c8c9-e3c3-4817-8d49-f0b1382ed3fc",
      "name": "Build Product Comment Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        144
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "04a36c3c-3288-4c0d-86d4-486d614d3a10",
      "name": "Generate Product Comment (AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        656,
        144
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1.8,
      "waitBetweenTries": 2000
    },
    {
      "id": "a974f5e6-127e-4e2a-8b4d-62a1af49ca29",
      "name": "Extract AI Output",
      "type": "n8n-nodes-base.set",
      "position": [
        1008,
        144
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "40e730ff-6af1-4933-aeae-534011520281",
      "name": "Post Review to Product",
      "type": "n8n-nodes-base.httpRequest",
      "maxTries": 5,
      "position": [
        1264,
        144
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 5000
    },
    {
      "id": "3b5fa5b5-e34e-43cf-bdd9-91de7fe1bc88",
      "name": "Fetch Articles from WordPress",
      "type": "n8n-nodes-base.httpRequest",
      "maxTries": 5,
      "position": [
        112,
        496
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "8b7b7c8b-6d1b-4607-bb05-df09d826376f",
      "name": "Build Article Comment Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        496
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a9a753f4-b25d-406b-82a8-37742c70545b",
      "name": "Generate Article Comment (AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        640,
        496
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1.8,
      "waitBetweenTries": 2000
    },
    {
      "id": "a021eabc-94d0-4267-a9d7-3f245eca0e61",
      "name": "Extract AI Output1",
      "type": "n8n-nodes-base.set",
      "position": [
        992,
        496
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "2efa30e8-d463-48ed-aa97-c5da08e43174",
      "name": "Post Comment to Article",
      "type": "n8n-nodes-base.httpRequest",
      "maxTries": 5,
      "position": [
        1248,
        496
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "f69f0508-f078-4e52-bb86-6b7b59b04686",
      "name": "Fetch Article Content (API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        864
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "67f7c59a-ab86-46b7-a0a8-2a929ea76866",
      "name": "Prepare Article Content Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        448,
        864
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ceebfe61-d937-4bf2-b830-f1e4b1f6fc56",
      "name": "Format Article Content for Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        688,
        864
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "62a31833-e8d7-453b-b2c6-ddbee6c0933b",
      "name": "Generate Heading & Summary Paragraph (AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        928,
        864
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "1c3033db-0219-4b01-86e5-7b094dcc2b4f",
      "name": "Format AI Output for Update",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        864
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "e5e45fb4-868a-4384-9132-ef2818387469",
      "name": "Update Article in WordPress",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1520,
        864
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "4282f20c-3c76-4b2d-9c03-7a4658e84f0a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        480
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "098c7452-91bb-4b1a-9113-00f93ee04cb8",
      "name": "Fetch Product Categories from WooCommerce",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        1168
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "0f8e577e-b7ae-4b10-8db9-ebb2f73422d6",
      "name": "Prepare Category Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        1168
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "8d7c47f4-2574-424e-8dc9-d126234f3d6f",
      "name": "Clean Category Description",
      "type": "n8n-nodes-base.code",
      "position": [
        688,
        1168
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "0a1af60d-7ab9-40dc-8044-b722680b1a6f",
      "name": "Generate Category Heading & Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        928,
        1168
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "e9a33302-00c1-4aa9-9593-a662d79eaec5",
      "name": "Update Product Category in WooCommerce",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1520,
        1168
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "3bcae65f-011a-4d68-81a6-ade55f4e6018",
      "name": "Format AI Output for Category Update",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        1168
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "3159e160-e762-4e78-83d5-e848e70bacd4",
      "name": "Fetch Products from WooCommerce (for Update)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        1504
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a590015f-72ec-4663-8d1a-2b0285c404e6",
      "name": "Prepare Product Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        464,
        1504
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "b7a346f7-1821-4d05-8966-276350000813",
      "name": "Clean Product Description & Short Description",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        1504
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "d4c0d8ed-37ed-4921-bd65-34d78b83af3d",
      "name": "Generate Product Descriptions",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        912,
        1504
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "2632a3aa-9a7f-4c92-a48a-61e39029a9e5",
      "name": "Format AI Output for Product Update",
      "type": "n8n-nodes-base.code",
      "position": [
        1264,
        1504
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "a0279473-af0d-40dd-98f0-8478cf07f45e",
      "name": "Update Product in WooCommerce",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1504,
        1504
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "041ea350-4715-4132-b15f-170191ae8533",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        1120
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e3aef832-58ec-413a-af92-ae25544c18e8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1056
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "4b4fbf76-b52e-4f30-88eb-5e0730498d75",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1376
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3a8dda0c-7411-4ba2-bb60-87f4b8c5b4e2",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "disabled": true,
      "position": [
        -240,
        672
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "276ef163-5cad-4135-b57a-07ecfb5ad13d",
      "name": "Execute workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -224,
        528
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "connections": {
    "Execute workflow": {
      "main": [
        [
          {
            "node": "Fetch Products from WooCommerce",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Articles from WordPress",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Article Content (API)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Product Categories from WooCommerce",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Products from WooCommerce (for Update)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract AI Output": {
      "main": [
        [
          {
            "node": "Post Review to Product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract AI Output1": {
      "main": [
        [
          {
            "node": "Post Comment to Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Product Fields": {
      "main": [
        [
          {
            "node": "Clean Product Description & Short Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Category Fields": {
      "main": [
        [
          {
            "node": "Clean Category Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Category Description": {
      "main": [
        [
          {
            "node": "Generate Category Heading & Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Article Content (API)": {
      "main": [
        [
          {
            "node": "Prepare Article Content Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI Output for Update": {
      "main": [
        [
          {
            "node": "Update Article in WordPress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Article Comment Prompt": {
      "main": [
        [
          {
            "node": "Generate Article Comment (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Product Comment Prompt": {
      "main": [
        [
          {
            "node": "Generate Product Comment (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Articles from WordPress": {
      "main": [
        [
          {
            "node": "Build Article Comment Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Article Comment (AI)": {
      "main": [
        [
          {
            "node": "Extract AI Output1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Product Comment (AI)": {
      "main": [
        [
          {
            "node": "Extract AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Product Descriptions": {
      "main": [
        [
          {
            "node": "Format AI Output for Product Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Article Content Fields": {
      "main": [
        [
          {
            "node": "Format Article Content for Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Products from WooCommerce": {
      "main": [
        [
          {
            "node": "Build Product Comment Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Article Content for Prompt": {
      "main": [
        [
          {
            "node": "Generate Heading & Summary Paragraph (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI Output for Product Update": {
      "main": [
        [
          {
            "node": "Update Product in WooCommerce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Category Heading & Summary": {
      "main": [
        [
          {
            "node": "Format AI Output for Category Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI Output for Category Update": {
      "main": [
        [
          {
            "node": "Update Product Category in WooCommerce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Categories from WooCommerce": {
      "main": [
        [
          {
            "node": "Prepare Category Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Heading & Summary Paragraph (AI)": {
      "main": [
        [
          {
            "node": "Format AI Output for Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Products from WooCommerce (for Update)": {
      "main": [
        [
          {
            "node": "Prepare Product Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Product Description & Short Description": {
      "main": [
        [
          {
            "node": "Generate Product Descriptions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}