{
  "name": "Rewrite web content with exact character counts using GPT-4.1 and Google Sheets",
  "nodes": [
    {
      "id": "ff0d97b0-f69e-4713-8459-ba1eab501847",
      "name": "Submit Content Rewriting Request",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "790a5941-be98-4c85-bdbb-3bd08d221d94",
      "name": "Fetch Reference URL Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        0
      ]
    },
    {
      "id": "83f109ab-b6ac-4d3a-8868-530bc76dd56c",
      "name": "Convert HTML to Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        400,
        0
      ]
    },
    {
      "id": "42924920-6968-4bf6-82c3-b31a0f5560d8",
      "name": "Rewrite Content with Exact Character Count",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        656,
        0
      ]
    },
    {
      "id": "a6e6090e-efaf-4287-a006-3c1cf4d5fc41",
      "name": "OpenAI GPT-4.1 Rewriting Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        656,
        192
      ]
    },
    {
      "id": "4fb016d3-a653-4cf9-a868-33648de2f39d",
      "name": "Compare Original vs Rewritten Content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1056,
        0
      ]
    },
    {
      "id": "4e4bf882-671b-4f7e-ad01-823aaf900872",
      "name": "OpenAI GPT-4.1 Comparison Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        992,
        272
      ]
    },
    {
      "id": "6d19ad50-61c8-4464-bbf1-88de45bb2f52",
      "name": "Parse Comparison to Structured Format",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1136,
        160
      ]
    },
    {
      "id": "3a2aaddb-5759-4665-a674-bad52dd1782d",
      "name": "OpenAI GPT-4o-mini Parser Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1136,
        368
      ]
    },
    {
      "id": "86944b96-8fc8-4836-ac14-965669c186d5",
      "name": "Split Comparison into Individual Rows",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1424,
        0
      ]
    },
    {
      "id": "2d36605c-22f3-4b14-9d49-ad06c245386f",
      "name": "Log Comparison to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1680,
        0
      ]
    },
    {
      "id": "7c69a88f-5505-46b9-9b67-61c2d6449edf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -352
      ],
      "parameters": {
        "width": 416,
        "height": 880,
        "content": "## Character-Preserving SEO Content Rewriter\n\nThis workflow rewrites web content while maintaining EXACT\ncharacter counts line-by-line—critical for preserving page\nlayout and design. Submit a referenc"
      }
    },
    {
      "id": "44078247-72f0-4524-959f-a49ec47f3026",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -144
      ],
      "parameters": {
        "width": 496,
        "height": 192,
        "content": "## Content Fetching\n\nReceives rewriting request via form, fetches\nthe reference URL's HTML content, and converts\nit to clean Markdown for AI processing."
      }
    },
    {
      "id": "8be4c5a5-d29a-44fd-91e3-8b4c8d60796d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -144
      ],
      "parameters": {
        "width": 352,
        "height": 192,
        "content": "## AI Content Rewriting\n\nRewrites content line-by-line maintaining EXACT\ncharacter count. Keeps form labels unchanged,\nskips URLs/footers, rewrites marketing content."
      }
    },
    {
      "id": "f7ffda9a-13e8-446b-9b9a-a7cc29fcd3a9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -144
      ],
      "parameters": {
        "width": 368,
        "height": 192,
        "content": "## Comparison Analysis\n\nCompares original vs rewritten content line-by-line,\ncreates structured JSON comparison with character\ncounts, and parses into proper format."
      }
    },
    {
      "id": "2eb15d8e-e23d-4210-8e7d-8c9139bb8817",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -144
      ],
      "parameters": {
        "width": 352,
        "height": 192,
        "content": "##  Results Logging\n\nSplits comparison data into individual rows\nand logs each comparison to Google Sheets\nwith old/new text and character counts."
      }
    }
  ],
  "connections": {
    "Convert HTML to Markdown": {
      "main": [
        [
          {
            "node": "Rewrite Content with Exact Character Count",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Reference URL Content": {
      "main": [
        [
          {
            "node": "Convert HTML to Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4.1 Rewriting Model": {
      "ai_languageModel": [
        [
          {
            "node": "Rewrite Content with Exact Character Count",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4.1 Comparison Model": {
      "ai_languageModel": [
        [
          {
            "node": "Compare Original vs Rewritten Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4o-mini Parser Model": {
      "ai_languageModel": [
        [
          {
            "node": "Parse Comparison to Structured Format",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Submit Content Rewriting Request": {
      "main": [
        [
          {
            "node": "Fetch Reference URL Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Original vs Rewritten Content": {
      "main": [
        [
          {
            "node": "Split Comparison into Individual Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Comparison to Structured Format": {
      "ai_outputParser": [
        [
          {
            "node": "Compare Original vs Rewritten Content",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Split Comparison into Individual Rows": {
      "main": [
        [
          {
            "node": "Log Comparison to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rewrite Content with Exact Character Count": {
      "main": [
        [
          {
            "node": "Compare Original vs Rewritten Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}