{
  "name": "Create SEO blog drafts in WordPress from trending topics with Perplexity and HuggingFace",
  "nodes": [
    {
      "id": "1bf916c9-017b-4bce-8adc-30aac2f7a10a",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        752,
        -288
      ]
    },
    {
      "id": "8da0df60-1ffa-4735-9ad2-b7f6ee3b0515",
      "name": "Parse Content from string to JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        2160,
        -288
      ]
    },
    {
      "id": "c5efa66e-4846-4468-80fc-97eabed55657",
      "name": "Create a post",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        960,
        0
      ]
    },
    {
      "id": "e77b9ec4-6ac6-451e-aa4d-c67c805ab65e",
      "name": "Update name and extension of image",
      "type": "n8n-nodes-base.code",
      "position": [
        1424,
        0
      ]
    },
    {
      "id": "9b582c7e-5863-40f2-b47b-d0bb8573ec64",
      "name": "Upload image to WP media Library",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1648,
        0
      ]
    },
    {
      "id": "559a37e9-e060-45e3-8d61-397920414ba1",
      "name": "Assign image to an article as a Featured image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1872,
        0
      ]
    },
    {
      "id": "1a35e95e-57cd-4e53-9430-43fd3b9d8ba7",
      "name": "Find top trending topics",
      "type": "n8n-nodes-base.perplexity",
      "position": [
        976,
        -288
      ]
    },
    {
      "id": "84b79e05-ae29-4647-ac3e-d566c2263b55",
      "name": "Select a clean trending topic",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        -288
      ]
    },
    {
      "id": "39c4fc04-9a02-45a6-be16-031c7fdc1902",
      "name": "Add topic to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1488,
        -288
      ]
    },
    {
      "id": "c72691df-220a-488b-ab9f-cf28a0e78a1f",
      "name": "Get most recent topics from Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1712,
        -288
      ]
    },
    {
      "id": "877d021b-cb3d-44de-8987-85d296cc024c",
      "name": "Generate content and image prompt using Perplexity AI",
      "type": "n8n-nodes-base.perplexity",
      "position": [
        1936,
        -288
      ]
    },
    {
      "id": "c42fe286-494b-4654-96c3-1c8d88cc7edb",
      "name": "Update Google Sheet with generated content",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        736,
        0
      ]
    },
    {
      "id": "5956316f-3859-4122-8443-aebf27fee08b",
      "name": "Generate featured image using HuggingFace FLUX",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1200,
        0
      ]
    },
    {
      "id": "e05330af-2f47-47ff-9bfc-7a2312b7dc70",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -384
      ],
      "parameters": {
        "width": 684,
        "height": 572,
        "content": "## Publish WordPress Blog Posts from Trending Topics with Perplexity, Google Sheets and HuggingFace\n\n### How it works\n1. **Discover trends** — Perplexity AI finds the hottest developer/security topic "
      }
    },
    {
      "id": "82238abd-74c0-4823-a84b-1ecdff0c2498",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -384
      ],
      "parameters": {
        "width": 724,
        "height": 276,
        "content": "### 🔍 Trend Discovery\nPerplexity searches for breaking news and viral topics, then selects one for content generation."
      }
    },
    {
      "id": "c92476e2-de69-4740-964a-cff0789cb67a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        -384
      ],
      "parameters": {
        "width": 908,
        "height": 276,
        "content": "### ✍️ Content Generation\nTopics are queued in Sheets, then Perplexity generates full blog content with SEO metadata. The JSON is parsed and saved back."
      }
    },
    {
      "id": "50728ace-6689-4369-9a4a-4b777ba0bcb7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -96
      ],
      "parameters": {
        "width": 400,
        "height": 276,
        "content": "### 📝 WordPress Publishing\nCreates a draft post with the generated title and content."
      }
    },
    {
      "id": "89660276-c432-463f-a535-0363bf59a1f8",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -96
      ],
      "parameters": {
        "width": 1032,
        "height": 276,
        "content": "### 🖼️ Featured Image\nFLUX generates an image, which is uploaded to WordPress and set as the featured media."
      }
    }
  ],
  "connections": {
    "Create a post": {
      "main": [
        [
          {
            "node": "Generate featured image using HuggingFace FLUX",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find top trending topics": {
      "main": [
        [
          {
            "node": "Select a clean trending topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add topic to Google Sheets": {
      "main": [
        [
          {
            "node": "Get most recent topics from Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select a clean trending topic": {
      "main": [
        [
          {
            "node": "Add topic to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload image to WP media Library": {
      "main": [
        [
          {
            "node": "Assign image to an article as a Featured image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Find top trending topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Content from string to JSON": {
      "main": [
        [
          {
            "node": "Update Google Sheet with generated content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update name and extension of image": {
      "main": [
        [
          {
            "node": "Upload image to WP media Library",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get most recent topics from Google Sheet": {
      "main": [
        [
          {
            "node": "Generate content and image prompt using Perplexity AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Google Sheet with generated content": {
      "main": [
        [
          {
            "node": "Create a post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate featured image using HuggingFace FLUX": {
      "main": [
        [
          {
            "node": "Update name and extension of image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate content and image prompt using Perplexity AI": {
      "main": [
        [
          {
            "node": "Parse Content from string to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}