{
  "id": "mTXOux8mm3Car4Uo",
  "name": "WordPress Blog Automation: AI SEO Content, Images, Scheduling & Email Alerts",
  "tags": [],
  "nodes": [
    {
      "id": "25d49ecf-2a4c-4e08-8060-6b62c2a9cfce",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        784,
        176
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "renameField": true,
              "outputFieldName": "Blog URL List",
              "fieldToAggregate": "=loc"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "49689745-b9b2-4d7e-ab27-a580dad65c95",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -272,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d9c0c4b2-846e-4f9b-a63e-b56151a02d3c",
              "name": "Date to be published",
              "type": "string",
              "value": "={{ $json['Date to be published'] }}"
            },
            {
              "id": "51fd362d-7aec-4fb0-8bde-4727ef12876b",
              "name": "Primary keyword",
              "type": "string",
              "value": "={{ $json['Primary keyword'] }}"
            },
            {
              "id": "6047f4e4-ce3b-4f1b-996d-6b7641ecef95",
              "name": "Secondary keyword",
              "type": "string",
              "value": "={{ $json['Secondary keyword'] }}"
            },
            {
              "id": "e0a35d0a-954e-4381-bd26-4d811962bbcf",
              "name": "Service areas",
              "type": "string",
              "value": "={{ $json['Service areas'] }}"
            },
            {
              "id": "941baef2-049a-485b-a15f-8565d8826a05",
              "name": "Product Category",
              "type": "string",
              "value": "={{ $json['Product Category'] }}"
            },
            {
              "id": "d81992b7-7b8d-4b8f-ad1c-d0446420035a",
              "name": "Internal Links",
              "type": "string",
              "value": "={{ $json['Internal Links'] }}"
            },
            {
              "id": "e74010d5-a4cc-4f27-a187-59be16aa4160",
              "name": "External Links",
              "type": "string",
              "value": "={{ $json['External Links'] }}"
            },
            {
              "id": "b45691e9-8fb4-49fe-b2d2-a7a288f454e1",
              "name": "Word Count",
              "type": "string",
              "value": "={{ $json['Word Count'] }}"
            },
            {
              "id": "52ebeb59-97ac-4d47-9d85-11345025f244",
              "name": "Chapters",
              "type": "string",
              "value": "={{ $json.Chapters }}"
            },
            {
              "id": "aeddf4b7-ba1f-4208-a92b-37120386ad3a",
              "name": "Style",
              "type": "string",
              "value": "={{ $json.Style }}"
            },
            {
              "id": "a3c81448-7529-4f15-8678-46845c861882",
              "name": "Category ID",
              "type": "string",
              "value": "={{ $json['Category ID'] }}"
            },
            {
              "id": "598fa97b-5d4d-4cf6-b25c-0da307a03549",
              "name": "Author ID",
              "type": "string",
              "value": "={{ $json['Author ID'] }}"
            },
            {
              "id": "1cec2391-fd3e-4038-ad94-06089ec982ba",
              "name": "Website",
              "type": "string",
              "value": "={{ $json.Website }}"
            },
            {
              "id": "78eade3f-baf4-4085-bd26-7b66b975eb91",
              "name": "Call to Action URL",
              "type": "string",
              "value": "={{ $json['Call to Action URL'] }}"
            },
            {
              "id": "043adc0d-d04b-4de3-b274-08c2be5f0c90",
              "name": "Customer Offer",
              "type": "string",
              "value": "={{ $json['Customer Offer'] }}"
            },
            {
              "id": "d4c6b8d4-02cd-4165-9339-58705fffa0a6",
              "name": "Logo URL",
              "type": "string",
              "value": "={{ $json['Logo URL'] }}"
            },
            {
              "id": "16c21fb3-9fcd-4b88-9494-9aa5d2b65096",
              "name": "Service page URL",
              "type": "string",
              "value": "={{ $json['Service Page'] }}"
            },
            {
              "id": "14ff917a-87dc-4323-8123-413524cafc75",
              "name": "confirmation email after a blog post is created",
              "type": "string",
              "value": "={{ $('Get post information from Spreadsheet').item.json['Blog Confirmation Mail'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c7750f10-5c86-4fcf-bb3f-c0ef956fe312",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1040,
        192
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 4
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8602bed6-8bb6-4012-a46b-9023985e68a6",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        576,
        176
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "urlset.url"
      },
      "typeVersion": 1
    },
    {
      "id": "d43855d7-c80d-481f-8026-8264e2c498de",
      "name": "XML",
      "type": "n8n-nodes-base.xml",
      "position": [
        384,
        176
      ],
      "parameters": {
        "options": {},
        "dataPropertyName": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "d8f59b65-eb1e-4341-9119-420a8b964525",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -576,
        688
      ],
      "parameters": {
        "jsCode": "let article = \"\";\n\n// Introduction\narticle += $input.first().json.message.content.introduction;\narticle += \"<br><br>\";\n\n// Chapters\nconst chapters = $input.first().json.message.content.chapters;\nfor (let i = 0; i < chapters.length; i++) {\n  // \u2705 Access properties directly (no .json)\n  article += \"<h2>\" + chapters[i].title + \"</h2>\";\n  article += chapters[i].prompt; // \u2705 Use 'content' field\n  article += \"<br><br>\";\n}\n\n// Conclusions\narticle += \"<h2>Final words</h2>\";\narticle += $input.first().json.message.content.conclusions;\n\n// FAQ Section\narticle += \"<h2>FAQ Section</h2>\";\nconst faqSection = $input.first().json.message.content['FAQ section'];\n\nif (Array.isArray(faqSection)) {\n  for (const faq of faqSection) {\n    if (faq.question && faq.answer) {\n      article += `<h3>${faq.question}</h3>`;\n      article += `<p>${faq.answer}</p>`;\n    }\n  }\n} else if (typeof faqSection === 'object' && faqSection !== null) {\n  if (faqSection.question && faqSection.answer) {\n    article += `<h3>${faqSection.question}</h3>`;\n    article += `<p>${faqSection.answer}</p>`;\n  }\n} else {\n  article += `<p>${faqSection}</p>`;\n}\n\nreturn [\n  {\n    \"article\": article\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "a0a0aab7-b47e-4e28-b399-1df9a20ebc97",
      "name": "Send to Wordpress2",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        -272,
        688
      ],
      "parameters": {
        "title": "={{ $('Generate all the necessary information of post').item.json.message.content.title }}\n",
        "additionalFields": {
          "slug": "={{ $('Edit Fields').first().json.Website }}/{{ $('Generate all the necessary information of post').first().json.message.content.Slug }}",
          "tags": [
            428
          ],
          "status": "draft",
          "content": "={{ $json.article }}",
          "authorId": "={{ $('Edit Fields').first().json['Author ID'] }}",
          "categories": "={{ $('Edit Fields').first().json['Category ID'] }}"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "424161ae-b7b4-4a93-a9b8-2b9ef8a7e226",
      "name": "Code in JavaScript1",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        688
      ],
      "parameters": {
        "jsCode": "function wrapText(text, maxCharsPerLine = 30) {\n    const words = text.split(' ');\n    let lines = [];\n    let currentLine = '';\n\n    for (const word of words) {\n        if ((currentLine + ' ' + word).trim().length <= maxCharsPerLine) {\n            currentLine += ' ' + word;\n        } else {\n            lines.push(currentLine.trim());\n            currentLine = word;\n        }\n    }\n    if (currentLine) lines.push(currentLine.trim());\n    return lines.join('\\n'); // Add line breaks\n}\n\n// Get your title\nconst title =$('Generate all the necessary information of post').first().json.message.content.title\n\n// Wrap the text\nitems[0].json.wrappedTitle = wrapText(title, 29); // 25 chars per line, adjust as needed\n\nreturn items;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "0759fb60-48d5-45c0-a733-68f595dcf13b",
      "name": "Get post information from Spreadsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -784,
        192
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GXRVPjsGPK5prQVvZUjg1fHKInvjqbEdAW09uCcq8sY/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1GXRVPjsGPK5prQVvZUjg1fHKInvjqbEdAW09uCcq8sY",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GXRVPjsGPK5prQVvZUjg1fHKInvjqbEdAW09uCcq8sY/edit?usp=drivesdk",
          "cachedResultName": "Blog n8n"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a7a4b2d0-f563-4bf1-a97c-8822eb0452b9",
      "name": "Compare date of spreadsheet and todays",
      "type": "n8n-nodes-base.if",
      "position": [
        -528,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "191433a8-3234-4cb7-8ffa-478efd2d1004",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json['Date to be published']?.trim()  }}\n\n\n\n",
              "rightValue": "={{ new Date($('Schedule Trigger1').item.json.timestamp).toISOString().split('T')[0] }}\n"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "ced37102-7938-41f0-b0d5-e7dd3aca6e9d",
      "name": "GET information from sitemap",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        176
      ],
      "parameters": {
        "url": "={{ $json.Website }}/post-sitemap.xml",
        "options": {},
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "3ce06a80-cb7c-4691-bef2-fa26783637f8",
      "name": "Generate all the necessary information of post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1008,
        688
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Write the title, the subtitle, the chapters details, the thumbnil title, the introduction, the conclusions, a google excerpt of maximum 160 characters, and an image prompt for a SEO-friendly article about these topics: {{ $('Edit Fields').item.json['Primary keyword'] }} The thumbnil title should to be related title that you will make but it must be below 20 letters, it will be use in feature image so make it professional and marketing friendly. Based on the blog title, create a short, three to five word URL slug to be input into Wordpress for SEO purposes. Be sure to separate the words in the slug with a dash (--) and not a space. URL slug MUST contain the SEO Keyword Phrase: {{ $('Edit Fields').item.json['Primary keyword'] }} Constraints: Do not include pretext or context, only return the URL slug. Create a call to action for the reader using the link {{ $('Edit Fields').item.json['Call to Action URL'] }} and insert this call to action into the final chapter. Do not repeat the call to action. Subly weave the offer, benefit and solutions offered by the author into the text. Determine the offer, benefits and solutions from {{ $('Edit Fields').item.json['Customer Offer'] }} Based on the blog article content (title, introductory paragraph and article body), create a Google meta description. Constraints: Do not include pretext or context, only return the Google meta description. Don't use words that include an apostrophe. Character limit is strictly 156 characters. Use an active voice and make it actionable. Include a call to action. Use the target key phrase {{ $('Edit Fields').item.json['Primary keyword'] }} Instructions: Write in the style of {{ $('Edit Fields').item.json.Style }} Place the article title in a JSON field called title Place the subtitle in a JSON field called subtitle Place the Thumbnil title in a JSON field called thumbnil title Place the introduction in a JSON field called introduction Place the google excerpt in a JSON field called Google Excerpt Place the slug in a JSON field called Slug Place the Google meta title in a JSON field called Google meta title Place the Google meta description in a JSON field called Google meta description In the introduction introduce the topic that is then explored in depth in the rest of the text The introduction should be around 60 words Do not use the phrase \"In this article\" or any other phrase that is similar Do not use the phrase \"In the fast-paced world\" or the word \"transformative\" or anything similar Place the conclusions in a JSON field called conclusions. **Include a complete FAQ section (4\u20136 Q&A entries) at the end** Place the FAQ section in a JSON field called FAQ section. The conclusions should be around 60 words Use the conclusions to sum all said in the article and offer a conclusion to the reader \n\nThere should be {{ $('Edit Fields').item.json.Chapters }} chapters.\n\nFor each chapter provide a title and an human readable and plugrosimn free exhaustive content First chapters should to be based on the {{ $('Edit Fields').item.json['Primary keyword'] }} \n\nSecond chapters should to be based on the {{ $('Edit Fields').item.json['Secondary keyword'] }} and here must the three internal links of the website own post {{ $json['Blog URL List'] }}\n\nThird chapters should to be based on the {{ $('Edit Fields').item.json['Customer Offer'] }} and here embed external links listed in the {{ $('Edit Fields').item.json['External Links'] }} , you must use those link\n\n\n\n\nFourth chapters should to be based on the {{ $('Edit Fields').item.json['Service areas'] }} based B2B office furniture marketing, here must use the google map link as clickable.\n\nPlace the chapters in an array field called chapters of Section\n\nFor each chapter provide the fields title and prompt\n\nThe chapters should follow a logical flow and not repeat the same concepts.\nThe chapters should be one related to the other and not isolated blocks of text. The text should be fluent and follow a linear logic. \n\nDon't start the chapters with \"Chapter 1\", \"Chapter 2\", \"Chapter 3\"... just write the title of the chapter For the title and the chapters' titles don't use colons (): For the text, use HTML for formatting, but limited to bold, italic and lists. Don't use markdown for formatting. Guidelines for writing the chapters:\n\nDon't use the phrase \"In today's fast paced world\" or any similar such phrases.\n\nDo not use any names of products or services.\n\nJust return the plain text for each chapter (no JSON structure).\n\nDon't use markdown for formatting.\n\nUse HTML for formatting, but limited to bold, italic and lists.\n\nDon't add internal titles or headings.\n\nThe length of each chapter should be around\n{{ Math.round( ( $('Edit Fields').item.json['Word Count'] - 120 ) / $('Edit Fields').item.json.Chapters ) }} words long\n\nTry to keep most sentences less than 20 words long.\n\nGo deep in the topic you treat, don't just throw some superficial info\n{{ $itemIndex > 0 ? \"- The previous chapter talks about \" + $input.all()[$itemIndex-1].json.title : \"\" }}\n{{ $itemIndex > 0 ? \"- The promt for the previous chapter is \" + $input.all()[$itemIndex-1].json.prompt : \"\" }}\n\n\n\nConsider the previous and following chapters while writing the text for this chapter. The text must be coherent with the previous and following chapters.\n\nReview this list of blog urls {{ $('Aggregate').item.json['Blog URL List'] }}    and then select a blog url that covers a topic discussed in each chapter. Add that link as <a href> HTML link in the chapter content. Use the URL provided\nto generate relevant hyperlink text for the <a href> links.\n\nOnly link to each link ONCE.\n\nIf there is no blog url in the list that is relevant to the\nchapter do not add any link.\n\nThis chapter should not repeat the concepts already exposed in the previous chapter.\n\nThis chapter is a part of a larger article so don't include an\nintroduction or conclusions. This chapter should merge with the rest of the article. Consider the customer's offer and incorporate the offer where appropriate {{ $('Edit Fields').item.json['Customer Offer'] }} Go deep in the topic you treat, don't just throw some superficial info"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "ea5ac65c-607a-48eb-ba66-ba7ee6ab1d64",
      "name": "GET image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        288,
        688
      ],
      "parameters": {
        "url": "https://res.cloudinary.com/dbpf3j934/image/upload/v1763646097/The-GCC-Blinds-Window-Treatments-3-1_iauheu.png",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "retryOnFail": false,
      "typeVersion": 4.3
    },
    {
      "id": "12682eba-7385-41e4-a1ff-2e3abf741e17",
      "name": "Edit Feature Image",
      "type": "n8n-nodes-base.editImage",
      "position": [
        816,
        688
      ],
      "parameters": {
        "text": "={{ $json.wrappedTitle }}",
        "options": {
          "font": "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf",
          "format": "png",
          "quality": 100,
          "fileName": "={{ $('Generate all the necessary information of post').item.json.message.content.title }}"
        },
        "fontSize": 120,
        "fontColor": "#FD5444",
        "operation": "text",
        "positionY": 850,
        "lineLength": 180
      },
      "typeVersion": 1
    },
    {
      "id": "7e97a557-b0d0-4f5c-827b-663ea936114b",
      "name": "Upload feature image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -960,
        1152
      ],
      "parameters": {
        "url": "={{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/media ",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Disposition",
              "value": "=attachment; filename={{ $('Generate all the necessary information of post').first().json.message.content.title }}.{{ $binary.data.fileExtension }} "
            },
            {
              "name": "content-type",
              "value": "={{ $binary.data.fileExtension }}"
            }
          ]
        },
        "inputDataFieldName": "data",
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "0b2f6974-87c2-4acf-bc13-56de0ad291cc",
      "name": "Design the post",
      "type": "n8n-nodes-base.html",
      "position": [
        -48,
        1152
      ],
      "parameters": {
        "html": "<html>\n<head>\n    <meta charset=\"UTF-8\" />\n    <title>My HTML documents</title>\n</head>\n<body>\n    <div class=\"container\">\n\n<h1>{{ $('Generate all the necessary information of post').all()[0].json.message.content.title }}</h1>\n    <p>{{ $('Code in JavaScript').item.json.article }}</p>\n    </div>\n</body>\n</html>\n\n<style>\n.container {\n    background-color: #ffffff;\n    text-align: left;\n}\n\nh1 {\n    color: #555555;\n    font-size: 24px;\n    font-weight: bold;\n    padding: 8px;\n}\n\nh2 {\n    color: #555555;\n    font-size: 18px;\n    font-weight: bold;\n    padding: 8px;\n}\n\n</style>\n\n<script>\nconsole.log(\"Hello World!\");\n</script>"
      },
      "typeVersion": 1.2
    },
    {
      "id": "0f35171c-e5bb-4bd0-a509-49b6aecc4e01",
      "name": "Added post excerpt",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        1152
      ],
      "parameters": {
        "url": "={{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/posts/{{ $('Send to Wordpress2').item.json.id }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "excerpt",
              "value": "={{ $('Generate all the necessary information of post').first().json.message.content['Google Excerpt'] }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "53d8bfb9-5d32-4909-ad24-e04fcc82dbfd",
      "name": "Added meta title, meta description and meta image for post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -288,
        1584
      ],
      "parameters": {
        "url": "={{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/posts/{{ $('Send to Wordpress2').item.json.id }}",
        "method": "PUT",
        "options": {},
        "jsonBody": "={\n  \"meta\": {\n    \"_yoast_wpseo_title\": \"{{ $('Generate all the necessary information of post').first().json.message.content['Google meta title'] }}\",\n    \"_yoast_wpseo_metadesc\": \"{{ $('Generate all the necessary information of post').first().json.message.content['Google meta description'] }}\",\n    \"_yoast_wpseo_opengraph-image\": \"{{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/media/{{ $json.id }}\",\n\n\n\n\"_yoast_wpseo_opengraph-title\": \"{{ $('Generate all the necessary information of post').first().json.message.content['Google meta title'] }}\",\n    \"_yoast_wpseo_opengraph-description\": \"{{ $('Generate all the necessary information of post').first().json.message.content['Google meta description'] }}\",\n    \n    \n    \"_yoast_wpseo_twitter-title\": \"{{ $('Generate all the necessary information of post').first().json.message.content['Google meta title'] }}\",\n    \"_yoast_wpseo_twitter-description\": \"{{ $('Generate all the necessary information of post').first().json.message.content['Google meta description'] }}\",\n    \"_yoast_wpseo_twitter-image\": \"{{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/media/{{ $json.id }}\"\n  }\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.3
    },
    {
      "id": "03e2ff32-2de3-4879-b109-f6d94b0f0d3c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2224,
        160
      ],
      "parameters": {
        "width": 1040,
        "height": 1136,
        "content": "# How it works\n## This workflow automates scheduled WordPress publishing using content stored in a Google Sheet. Every day at the set time, it checks the sheet for posts scheduled for today. If a match is found, the workflow generates the full article structure using OpenAI (title, metadata, summary, chapters, and internal link placeholders). Two small Code nodes convert that output into publish-ready HTML. The generated article is then sent to WordPress as a draft. After publishing, the workflow fetches your sitemap, extracts all post URLs, and aggregates them for internal linking inside the article\u2019s chapter list. After save the post as a draft in wordpress it will notify you by a email.\n\n# Setup steps\n\n### 1. Add Google Sheets credentials and connect the sheet containing your post SEO based keyword and others information.\n\n### 2. Ensure your sheet includes: Date to be published, Primary keyword, Secondary keyword, Category/Subcategory, Questions, and Summary.\n\n### 3. Add OpenAI credentials and update the model if needed.\n\n### 4. Add your WordPress API credentials (Application Password recommended).\n\n### 5. Replace the sitemap URL with your own domain\u2019s post-sitemap.xml.\n\n### 6. Replace the post image URL which you want to edit.\n\n### 7. Review the Code nodes and adjust HTML formatting and field names if your sheet structure differs.\n\n### 8. Enable the schedule trigger for automatic daily publishing."
      },
      "typeVersion": 1
    },
    {
      "id": "f895c711-415c-4902-bd3c-1af9c1dd547b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        64
      ],
      "parameters": {
        "color": 6,
        "width": 992,
        "height": 320,
        "content": "## STEP 1: \ud83d\udfe6 Trigger & Spreadsheet Input\n\n#### Retrieves spreadsheet data, checks if today is the publish date, and prepares all fields needed for the article generation."
      },
      "typeVersion": 1
    },
    {
      "id": "78b0b38f-ceae-42a1-9380-12bab549c93d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 960,
        "height": 384,
        "content": "## STEP 2:  \ud83d\udfe8 Sitemap Fetching and Internal Link Collector\n\n###  1. Downloads your post sitemap and converts it into an XML structure for parsing.\n###  2.  Extracts blog URLs from the sitemap and aggregates them for internal linking inside the generated article."
      },
      "typeVersion": 1
    },
    {
      "id": "899a0d72-2351-4822-b3fb-87aae0762542",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        464
      ],
      "parameters": {
        "color": 6,
        "width": 960,
        "height": 384,
        "content": "## STEP 3:  \ud83d\udfe9 AI Content Generation and WordPress Publisher\n\n###  1. Generates structured article content using your keyword set. Code nodes convert the OpenAI JSON into a final HTML article + formatted title.\n###  2. Sends the generated article to your WordPress site using the REST API. Publishes as draft unless edited."
      },
      "typeVersion": 1
    },
    {
      "id": "a5b6d91b-939e-43f9-bd16-d6fefefdf291",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        464
      ],
      "parameters": {
        "width": 960,
        "height": 384,
        "content": "## STEP 4:  \ud83d\udfe9 GET image and editImage\n\n###  1. Fetch Base Feature Image\n###  2. Create SEO-Friendly Feature Image"
      },
      "typeVersion": 1
    },
    {
      "id": "e92a15ae-88e7-4a04-a1ec-ab18fb6df562",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        960
      ],
      "parameters": {
        "color": 6,
        "width": 736,
        "height": 384,
        "content": "## STEP 5:  \ud83d\udfe7 Upload Generated Featured Image and Add SEO-Friendly Image Meta\n\n###  1. Uploaded the created image at media library and used as a feature image for the post\n###  2. Adds SEO-friendly:  Alt text, Title, Caption and Description of feature image"
      },
      "typeVersion": 1
    },
    {
      "id": "b102f651-4714-495f-88ae-3462ae3b5231",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        928
      ],
      "parameters": {
        "color": 5,
        "width": 496,
        "height": 384,
        "content": "## STEP 6:  \ud83d\udfea HTML Post Template Renderer\n\n###  Builds the blog post HTML using the AI-generated title + article content. This node formats output inside a styled <html> layout for WordPress publishing."
      },
      "typeVersion": 1
    },
    {
      "id": "0c2ec22a-10dd-411f-afba-baa82eee0184",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        928
      ],
      "parameters": {
        "color": 7,
        "width": 544,
        "height": 416,
        "content": "## STEP 7:  \ud83d\udfea Post Excerpt Builder and Featured Image Meta Writer\n\n###  1. Creates a short summary of the article for WordPress. Used for SEO, search results, and theme previews.\n###  2. Adds SEO metadata to the uploaded feature image: alt text, title, caption, description. Improves accessibility and Google Image ranking."
      },
      "typeVersion": 1
    },
    {
      "id": "67aae0e0-a3af-4d0d-b8d5-984a7bcc603f",
      "name": "Post feature image meta information",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        832,
        1152
      ],
      "parameters": {
        "url": "={{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/posts/{{ $json.id }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "featured_media",
              "value": "={{ $('Added feature image meta information').item.json.id }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "3cd53bf8-7264-441b-a472-3ce1b22cca34",
      "name": "Added feature image meta information",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -560,
        1152
      ],
      "parameters": {
        "url": "={{ $('Edit Fields').first().json.Website }}/wp-json/wp/v2/media/{{ $json.id }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "title",
              "value": "={{ $('Generate all the necessary information of post').first().json.message.content.title }}"
            },
            {
              "name": "slug",
              "value": "={{ $('Generate all the necessary information of post').first().json.message.content.Slug }}"
            },
            {
              "name": "alt_text",
              "value": "=An image illustrating {{ $('Generate all the necessary information of post').first().json.message.content.title }}"
            },
            {
              "name": "caption",
              "value": "={{ $('Generate all the necessary information of post').first().json.message.content.title }}"
            },
            {
              "name": "description",
              "value": "=This image is about {{ $('Generate all the necessary information of post').first().json.message.content.title }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "typeVersion": 4.3
    },
    {
      "id": "b01e492f-12ac-4f22-baf5-f5a806253e4b",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        1408
      ],
      "parameters": {
        "color": 5,
        "width": 624,
        "height": 352,
        "content": "## STEP 7:  \ud83d\udfe7 SEO Meta Writer\n\n###  Adds Yoast-based SEO fields to the WordPress post: meta title, meta description, OpenGraph image/title/description, Twitter card metadata. you can also write for others."
      },
      "typeVersion": 1
    },
    {
      "id": "40462181-36f2-4c6e-b33a-0972779e0143",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        1424
      ],
      "parameters": {
        "color": 3,
        "width": 592,
        "height": 320,
        "content": "## STEP 8:  \ud83d\udfe9 Email Node \u2013 Send Draft Notification\n\n### Sends the email to admin for publishing the post to website"
      },
      "typeVersion": 1
    },
    {
      "id": "4fc41079-901c-4e9c-8497-d3ed7f907fee",
      "name": "Send a Email to admin",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        1584
      ],
      "parameters": {
        "sendTo": "={{ $('Edit Fields').item.json['confirmation email after a blog post is created'] }}",
        "message": "=Hello, \nWe\u2019re excited to inform you that your blog post titled {{ $('Generate all the necessary information of post').item.json.message.content.title }}  has been successfully created and saved as a draft on your website.  \nHere are the details:Title: {{ $('Generate all the necessary information of post').item.json.message.content.title }}\nScheduled Publish Date: {{ $('Schedule Trigger1').item.json.timestamp }} You can review, edit, or publish the post directly from your WordPress dashboard.\nHappy blogging!",
        "options": {},
        "subject": "Your Blog Post Has Been Successfully Created"
      },
      "typeVersion": 2.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c3c83a49-cd24-4a32-9cfe-e1565565d66d",
  "connections": {
    "XML": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Generate all the necessary information of post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET image": {
      "main": [
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "GET information from sitemap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Design the post": {
      "main": [
        [
          {
            "node": "Added post excerpt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Get post information from Spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Added post excerpt": {
      "main": [
        [
          {
            "node": "Post feature image meta information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Send to Wordpress2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Feature Image": {
      "main": [
        [
          {
            "node": "Upload feature image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to Wordpress2": {
      "main": [
        [
          {
            "node": "GET image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Edit Feature Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload feature image": {
      "main": [
        [
          {
            "node": "Added feature image meta information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET information from sitemap": {
      "main": [
        [
          {
            "node": "XML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post feature image meta information": {
      "main": [
        [
          {
            "node": "Added meta title, meta description and meta image for post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Added feature image meta information": {
      "main": [
        [
          {
            "node": "Design the post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get post information from Spreadsheet": {
      "main": [
        [
          {
            "node": "Compare date of spreadsheet and todays",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare date of spreadsheet and todays": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate all the necessary information of post": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Added meta title, meta description and meta image for post": {
      "main": [
        [
          {
            "node": "Send a Email to admin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}