{
  "name": "Publish WordPress posts from Google Sheets with images and tags",
  "nodes": [
    {
      "id": "a28c26ce-d4f3-43fb-96a1-7ab314a5c73a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1296,
        0
      ]
    },
    {
      "id": "32a0c862-877d-4ff3-8c2d-d123ee3520ed",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -320,
        0
      ]
    },
    {
      "id": "88f6b20d-8551-4eec-9535-ef6ef5769f2f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -160
      ],
      "parameters": {
        "width": 246,
        "height": 144,
        "content": "## Fetch READY rows\n\nLoads rows where status is READY from the Google Sheet."
      }
    },
    {
      "id": "a029d6e6-febc-4933-86ad-b5dec4185413",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -112
      ],
      "parameters": {
        "width": 2464,
        "height": 96,
        "content": "## Process rows\n\nLoops through selected rows and publishes them one by one."
      }
    },
    {
      "id": "47dce6f1-e002-44db-9ee9-0a47fe1abc7c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        48
      ],
      "parameters": {
        "width": 560,
        "height": 96,
        "content": "## Optional featured image\n\nIf image_url exists: download → upload to WP Media → use as featured image."
      }
    },
    {
      "id": "bead93d3-9b9e-4dad-b413-e3ccd8b3a32b",
      "name": "If ($image)",
      "type": "n8n-nodes-base.if",
      "position": [
        -112,
        160
      ]
    },
    {
      "id": "5105b660-c165-4f42-8c26-1017401645a5",
      "name": "Load $image as binary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        112,
        160
      ]
    },
    {
      "id": "c549d894-d53f-41d6-9a88-55c973e0d78f",
      "name": "Upload $image to WP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        160
      ]
    },
    {
      "id": "ec070ef4-9c29-4515-8eae-fa7548212015",
      "name": "Get tag_id from WP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1376,
        432
      ]
    },
    {
      "id": "5829d9fe-b566-43d5-8ffb-f22ec328c141",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        208
      ],
      "parameters": {
        "width": 1552,
        "height": 96,
        "content": "## Tags from hashtags\n\nParse hashtags → get/create WP tags → collect tag IDs for the post."
      }
    },
    {
      "id": "035ca5a6-71e6-4113-bf77-d0861cbf7cc6",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2368,
        0
      ]
    },
    {
      "id": "c86a5481-e8a8-410d-9291-c34b605c7e8a",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2576,
        0
      ]
    },
    {
      "id": "0dc91e87-7026-42a3-9452-b5ca00b96758",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        -112
      ],
      "parameters": {
        "width": 528,
        "height": 96,
        "content": "## Publish + update sheet\n\nCreate WP post → write POSTED + URL back to the same row."
      }
    },
    {
      "id": "ab8e0d5a-6455-4653-80c1-e3c46c194287",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        960,
        320
      ]
    },
    {
      "id": "c2861d90-2485-4eb0-a6ba-b57978d594f3",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1152,
        320
      ]
    },
    {
      "id": "e0ee229b-d509-4e7c-9918-6ab032adbf1c",
      "name": "Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -1088,
        0
      ]
    },
    {
      "id": "1460f3ee-f47f-4523-8f9b-176fd76411ea",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -160
      ],
      "parameters": {
        "width": 326,
        "height": 144,
        "content": "## Inputs & credentials\n\nSet WordPress site URL + Google Sheet URL. Connect WP + Google credentials."
      }
    },
    {
      "id": "8dfa4b2b-e673-4fe3-a4b5-7970e7f257aa",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -832,
        0
      ]
    },
    {
      "id": "e418e89a-6e40-43e9-b82a-df677eaa540e",
      "name": "If ($tags)",
      "type": "n8n-nodes-base.if",
      "position": [
        592,
        320
      ]
    },
    {
      "id": "fc5b63b3-73cf-4cb1-873f-98c7d5ade380",
      "name": "Parse $tags",
      "type": "n8n-nodes-base.code",
      "position": [
        784,
        320
      ]
    },
    {
      "id": "b6ba7e92-fb2d-4f0b-85c4-893d25a8bb1b",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1616,
        432
      ]
    },
    {
      "id": "cf8e467d-2ed2-4c66-9be8-ce239f9ecfcd",
      "name": "Create new tag",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1792,
        432
      ]
    },
    {
      "id": "3ccc305a-d926-49c8-aa7b-6cf54466ab7a",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -560,
        0
      ]
    },
    {
      "id": "a8e27a26-f66a-4ce5-81ca-2e392f57feac",
      "name": "Prepare data",
      "type": "n8n-nodes-base.code",
      "position": [
        2176,
        0
      ]
    },
    {
      "id": "91e83162-edd2-4efd-aa64-e16e7a54a724",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        336
      ],
      "parameters": {
        "width": 480,
        "height": 80,
        "content": "## Create new ones\ncreate new tags & get their ids from WP if necessary"
      }
    },
    {
      "id": "fcc082c6-6dab-42d2-b406-d8b0ad5d28f6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        336
      ],
      "parameters": {
        "width": 176,
        "height": 80,
        "content": "## Get tag ids\nselect tag ids from WP"
      }
    },
    {
      "id": "b3d6cc64-95bc-495a-8e4f-967cc0668178",
      "name": "Store tag_id",
      "type": "n8n-nodes-base.code",
      "position": [
        2000,
        432
      ]
    },
    {
      "id": "31f78df4-caa3-48cf-b68c-704d160f218d",
      "name": "Store tag_id1",
      "type": "n8n-nodes-base.code",
      "position": [
        2000,
        608
      ]
    },
    {
      "id": "46844914-5e7e-4bb0-a03f-aa9272d2cadc",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -720
      ],
      "parameters": {
        "width": 912,
        "height": 480,
        "content": "## Google Sheets → WordPress Publisher\n\n**How it works**\n\nThis workflow reads rows from a Google Sheet where status = READY, then publishes each row as a WordPress post via the WP REST API. If image_u"
      }
    },
    {
      "id": "6a4472d4-5edd-4506-be93-0fa72401d521",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -720
      ],
      "parameters": {
        "width": 608,
        "height": 400,
        "content": "## Video Walkthrough\n@[youtube](W3xQ1t4irqc)\n"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Store tag_id1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create new tag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Variables": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If ($tags)": {
      "main": [
        [
          {
            "node": "Parse $tags",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If ($image)": {
      "main": [
        [
          {
            "node": "Load $image as binary",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If ($tags)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse $tags": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare data": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store tag_id": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store tag_id1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create new tag": {
      "main": [
        [
          {
            "node": "Store tag_id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "If ($image)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Prepare data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get tag_id from WP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get tag_id from WP": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload $image to WP": {
      "main": [
        [
          {
            "node": "If ($tags)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load $image as binary": {
      "main": [
        [
          {
            "node": "Upload $image to WP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}