{
  "name": "Batch Delete Posts and Featured Images in WordPress",
  "nodes": [
    {
      "id": "268a318e-a605-40dc-b28f-b16ff038399d",
      "name": "delete img",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1700,
        420
      ]
    },
    {
      "id": "97381d8a-bcba-4ea6-9fce-ab56a1588c83",
      "name": "get img",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1520,
        420
      ]
    },
    {
      "id": "07eb4f65-da06-413b-af1e-98504dc6050c",
      "name": "get post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        600,
        580
      ]
    },
    {
      "id": "c18c430f-98d9-4e7c-9688-3cc2cfa5daa3",
      "name": "delete post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1880,
        600
      ]
    },
    {
      "id": "0d00aa0f-c030-489d-a7e1-744cdf0c1c7b",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        900,
        580
      ]
    },
    {
      "id": "1f6f520f-35f1-4424-9cec-431175c42c0f",
      "name": "Has Img",
      "type": "n8n-nodes-base.if",
      "position": [
        1200,
        580
      ]
    },
    {
      "id": "36465680-6de2-484a-94e0-e7778b0ed7ef",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        240
      ],
      "parameters": {
        "width": 297.80842911877414,
        "height": 512.4904214559392,
        "content": "## Approvals\nBuilt out your approval process here.\n\nEither use this workflow as a manually-driven time saver. Or split it into two workflows with your approvals in an external app like Slack or email."
      }
    },
    {
      "id": "3e200e7f-f14b-4897-a1b1-274256fa72a7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        240
      ],
      "parameters": {
        "width": 317.5478927203068,
        "height": 512.4904214559392,
        "content": "## Router\nThis step detects if the post has a featured image associated."
      }
    },
    {
      "id": "9f017854-e445-409f-a465-5eef1c09e891",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        240
      ],
      "parameters": {
        "width": 696.8275862068976,
        "height": 512.4904214559392,
        "content": "## This is the Magic\nIf the post has a featured media associated, the workflow will first deleted that media, then delete the post.\n\nIf it has no media associated, then the workflow simply deletes the"
      }
    },
    {
      "id": "b82386f4-f759-40ac-b89a-43815875882c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        240
      ],
      "parameters": {
        "width": 297.80842911877414,
        "height": 512.4904214559392,
        "content": "## Trigger\nThis workflow is set up for bulk/batch deletion of many WordPress posts.\n\nIt has been pre-loaded with the property `wpUrl` set to 'https://setyourwordpresshere.com' - which you should chang"
      }
    },
    {
      "id": "03d113e5-c1c0-4dab-ac64-c6a9388b9d91",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        240
      ],
      "parameters": {
        "width": 297.80842911877414,
        "height": 512.4904214559392,
        "content": "## Get Your Posts\n**IMPORTANT:** Be sure to add your authentication for WordPress in the HTTP Request node.\n\nThis request will return all `pending` status posts, ordered by *date, descending*. So it r"
      }
    },
    {
      "id": "72d4044c-8e62-43dc-8fd7-0b3fc9accbca",
      "name": "delete post with img",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1880,
        420
      ]
    },
    {
      "id": "3ccd76b6-8b6f-462e-bb29-a539b7a8e286",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2120,
        240
      ],
      "parameters": {
        "width": 286.52873563218395,
        "height": 512.490421455939,
        "content": "## Expansion\nYou might consider storing the results of the deleted posts to a data storage tool like Airtable, Nocodb, Sheets, or a database, for good record keeping."
      }
    },
    {
      "id": "ac2c0f9a-ed6a-44cc-8ac7-0498187133e4",
      "name": "Change your Domain here",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        300,
        580
      ]
    }
  ],
  "connections": {
    "Filter": {
      "main": [
        [
          {
            "node": "Has Img",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Img": {
      "main": [
        [
          {
            "node": "get img",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delete post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get img": {
      "main": [
        [
          {
            "node": "delete img",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get post": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "delete img": {
      "main": [
        [
          {
            "node": "delete post with img",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change your Domain here": {
      "main": [
        [
          {
            "node": "get post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}