{
  "name": "Write a WordPress post with AI (starting from a few keywords)",
  "nodes": [
    {
      "id": "8eaf0925-1394-4771-bf43-281ad14fefb4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        880
      ],
      "parameters": {
        "width": 301.3874093724939,
        "height": 371.765663140765,
        "content": "## Data check"
      }
    },
    {
      "id": "ab31ac7c-6bd4-44f6-8c0c-8e41463a3983",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        940
      ],
      "parameters": {
        "width": 272.8190508599808,
        "height": 80,
        "content": "Checks that the data returned by OpenAI is correct"
      }
    },
    {
      "id": "306ffdb5-d6b6-4e49-a26d-a256e32f7c67",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1940,
        880
      ],
      "parameters": {
        "width": 302,
        "height": 392,
        "content": "## Draft on WordPress"
      }
    },
    {
      "id": "928da5f9-194c-461d-a5dd-7fd5c8563345",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1960,
        960
      ],
      "parameters": {
        "width": 254.77269221373095,
        "height": 80,
        "content": "The article is posted as a draft on WordPress"
      }
    },
    {
      "id": "271f6b4d-cf7c-49b8-9479-dd753d7c5199",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2260,
        880
      ],
      "parameters": {
        "width": 678,
        "height": 389,
        "content": "## Featured image"
      }
    },
    {
      "id": "efb047c4-b835-4706-af6a-b40c6cd76757",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2280,
        960
      ],
      "parameters": {
        "width": 517.9195082760601,
        "height": 80,
        "content": "The image is generated with Dall-E, uploaded to WordPress, and then connected to the post as its featured image"
      }
    },
    {
      "id": "4f78eb2c-a501-4774-b5ab-29d7aa83817d",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        940
      ],
      "parameters": {
        "width": 287.370178643191,
        "height": 80,
        "content": "Starting from the given keywords, generates the article title, subtitle, chapters, and image prompt"
      }
    },
    {
      "id": "536d265a-1c0b-4262-adab-96edd5924530",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        880
      ],
      "parameters": {
        "width": 360,
        "height": 371,
        "content": "## Article structure"
      }
    },
    {
      "id": "8b4b7cf6-4809-44e7-af9a-c72919981698",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        880
      ],
      "parameters": {
        "width": 239.97343293577688,
        "height": 370.512611879577,
        "content": "## User form"
      }
    },
    {
      "id": "734b8ac2-2148-4d56-ab04-84f12991cf44",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        940
      ],
      "parameters": {
        "width": 199.7721486302032,
        "height": 80,
        "content": "The user triggers the post creation"
      }
    },
    {
      "id": "c54f91a7-ac3d-4029-a19f-3fa3794d581a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2960,
        880
      ],
      "parameters": {
        "width": 220,
        "height": 391,
        "content": "## User feedback"
      }
    },
    {
      "id": "509e89e7-8916-4228-91ae-baae25a75be7",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2980,
        960
      ],
      "parameters": {
        "width": 183.38125554060056,
        "height": 80,
        "content": "Final confirmation to the user"
      }
    },
    {
      "id": "5c6e90c4-9714-43db-a82c-54fcbf43a26c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        1280
      ],
      "parameters": {
        "width": 281.2716777103785,
        "height": 288.4116890365125,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nUser is notified to try again since some data is missing"
      }
    },
    {
      "id": "54e10057-b300-475b-8280-cb761acc303a",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        1280
      ],
      "parameters": {
        "width": 340,
        "height": 275,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nWikipedia is used to write the article"
      }
    },
    {
      "id": "5f5b9ad9-1da5-4321-b6b4-e1985ff257ca",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        880
      ],
      "parameters": {
        "width": 226.71615243495023,
        "height": 370.512611879577,
        "content": "## Settings"
      }
    },
    {
      "id": "6e298414-634f-45fb-b931-2abcae9c6db1",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        940
      ],
      "parameters": {
        "width": 179.37633247508526,
        "height": 80,
        "content": "Set the URL of your WordPress here"
      }
    },
    {
      "id": "94b09f31-31aa-4284-936e-c37fb3088acc",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        880
      ],
      "parameters": {
        "width": 225.47038972308582,
        "height": 370.512611879577,
        "content": "## Chapters split"
      }
    },
    {
      "id": "633cba39-ec92-410c-b010-083048487b2b",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        940
      ],
      "parameters": {
        "width": 185.6051460344073,
        "height": 80,
        "content": "Splits out chapter contents from the previous node"
      }
    },
    {
      "id": "4c9fd35f-d69d-4ced-a759-175336f43c8a",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        940
      ],
      "parameters": {
        "width": 287.370178643191,
        "height": 80,
        "content": "Writes the text for each chapter"
      }
    },
    {
      "id": "0d751d84-117a-4bf4-a9a7-d5ad1b557fec",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        880
      ],
      "parameters": {
        "width": 333.40108076977657,
        "height": 370.512611879577,
        "content": "## Chapters text"
      }
    },
    {
      "id": "ce36a500-136b-4082-988c-5f9b6dd6d971",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        880
      ],
      "parameters": {
        "width": 420.4253447940705,
        "height": 514.2177254645992,
        "content": "## Content preparation"
      }
    },
    {
      "id": "9da83dc4-9e99-42a4-88a1-27ef87df6d09",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        960
      ],
      "parameters": {
        "width": 368.1523541074699,
        "height": 80,
        "content": "Merges the content and prepare it before sending it to WordPress"
      }
    },
    {
      "id": "8591f4cb-edc4-4582-96b4-bcb2214a27a7",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -340,
        1080
      ]
    },
    {
      "id": "59619ea3-ac29-4188-9050-a6711c3f0921",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        940,
        1080
      ]
    },
    {
      "id": "728b7e4c-7b4a-46d9-ac86-98c23bda6c98",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1180,
        1080
      ]
    },
    {
      "id": "85007abe-b4b1-4263-a7e6-62f0a2ebd7c3",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -60,
        1080
      ]
    },
    {
      "id": "d87b4460-1bf1-4c7f-8f5a-51993c1b7cd0",
      "name": "Create post title and structure",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        180,
        1080
      ]
    },
    {
      "id": "57f5811a-e82e-4dd3-8d53-0559b2716dac",
      "name": "Wikipedia",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "position": [
        280,
        1360
      ]
    },
    {
      "id": "1987ab2c-4b6e-451d-a831-0817004be72b",
      "name": "Check data consistency",
      "type": "n8n-nodes-base.if",
      "position": [
        620,
        1080
      ]
    },
    {
      "id": "6b22ae14-80c9-48ac-9a03-9266bc3a9aa4",
      "name": "Form",
      "type": "n8n-nodes-base.form",
      "position": [
        940,
        1340
      ]
    },
    {
      "id": "5a22467a-6835-4a62-951f-e8cd43bef3af",
      "name": "Merge chapters title and text",
      "type": "n8n-nodes-base.merge",
      "position": [
        1580,
        1200
      ]
    },
    {
      "id": "f4609858-7f65-4f2d-b222-f03ee207f166",
      "name": "Final article text",
      "type": "n8n-nodes-base.code",
      "position": [
        1760,
        1080
      ]
    },
    {
      "id": "e21a5519-315b-442e-97d0-8ee745138652",
      "name": "Post on Wordpress",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        2040,
        1080
      ]
    },
    {
      "id": "7d7de1e3-cff2-41f2-a8ae-123441d9b18c",
      "name": "Generate featured image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2340,
        1080
      ]
    },
    {
      "id": "edbd0658-0edf-43e8-8428-3fea52639d62",
      "name": "Upload media",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2560,
        1080
      ]
    },
    {
      "id": "e2cd720b-03e6-4cee-8901-a6a06e4bd1ec",
      "name": "Set image ID for the post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2780,
        1080
      ]
    },
    {
      "id": "daddda39-db6a-4266-b823-8ae9080ca1a8",
      "name": "Form1",
      "type": "n8n-nodes-base.form",
      "position": [
        3020,
        1080
      ]
    }
  ],
  "connections": {
    "OpenAI": {
      "main": [
        [
          {
            "node": "Merge chapters title and text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Create post title and structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge chapters title and text",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "Create post title and structure",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Set image ID for the post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post on Wordpress": {
      "main": [
        [
          {
            "node": "Generate featured image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final article text": {
      "main": [
        [
          {
            "node": "Post on Wordpress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check data consistency": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate featured image": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set image ID for the post": {
      "main": [
        [
          {
            "node": "Form1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge chapters title and text": {
      "main": [
        [
          {
            "node": "Final article text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create post title and structure": {
      "main": [
        [
          {
            "node": "Check data consistency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}