{
  "name": "My workflow 2",
  "nodes": [
    {
      "parameters": {
        "formTitle": "SEO Audit",
        "formDescription": "Conducts an SEO audit based on the provided URL using an n8n workflow",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Page URL",
              "placeholder": "https://avertra.com/",
              "requiredField": true
            },
            {
              "fieldLabel": "Your Email",
              "placeholder": "joe@doe.mow",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -420,
        480
      ],
      "id": "66c0d0bf-0e0c-4a34-a7ba-76f7b2f39e65",
      "name": "On form submission",
      "webhookId": "0d55af5d-a0bf-4c9e-88d9-63a47e174433"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        60,
        320
      ],
      "id": "5fe04108-a383-4110-90f2-305b985f0d68",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "Q20U0hFQ58sJQred",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        60,
        980
      ],
      "id": "8a83c573-1e93-413c-8ffa-f166b8e8ba2c",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "Q20U0hFQ58sJQred",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n\t\"titlemain\": \"main title\",\n\t\"intromain\": \"introduction\",\n  \t\"criticaltitle\": \"critical items title\",\n\t\"critlist\": [\"critical\", \"item\", \"list\"],\n  \t\"mediumtitle\": \"medium items title\",\n\t\"mediumlist\": [\"medium\", \"item\", \"list\"],\n  \t\"lowtitle\": \"low items title\",\n\t\"lowlist\": [\"low\", \"item\", \"list\"]\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        260,
        300
      ],
      "id": "75dccd3e-366d-4d1c-9467-ed9d3b3e4768",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n\t\"titlemain\": \"main title\",\n\t\"intromain\": \"introduction\",\n  \t\"criticaltitle\": \"critical items title\",\n\t\"critlist\": [\"critical\", \"item\", \"list\"],\n  \t\"mediumtitle\": \"medium items title\",\n\t\"mediumlist\": [\"medium\", \"item\", \"list\"],\n  \t\"lowtitle\": \"low items title\",\n\t\"lowlist\": [\"low\", \"item\", \"list\"]\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        220,
        980
      ],
      "id": "67137d6c-fb9b-41d8-8a84-a6d7612e8196",
      "name": "Structured Output Parser1"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        320,
        1120
      ],
      "id": "61278e4d-8c78-4a8f-82dc-d3f06c901f11",
      "name": "OpenAI Chat Model2",
      "credentials": {
        "openAiApi": {
          "id": "Q20U0hFQ58sJQred",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        340,
        440
      ],
      "id": "feb8d7e1-645f-4981-856c-f51985426c1d",
      "name": "OpenAI Chat Model3",
      "credentials": {
        "openAiApi": {
          "id": "Q20U0hFQ58sJQred",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json['Your Email'] }}",
        "subject": "=On-Page SEO Report for {{ $('On form submission').item.json['Page URL'] }}",
        "message": "Kindly find the report in the attachment of this email.",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {
                "property": "on-page-seo-report.pdf"
              }
            ]
          }
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1180,
        120
      ],
      "id": "2a91c75c-54b7-4728-a8b4-54ecee099b92",
      "name": "Email the Document",
      "webhookId": "0e626ecc-b764-41a5-8cf9-c7e1ea166763",
      "disabled": true
    },
    {
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json['Your Email'] }}",
        "subject": "=Off-Page SEO Report for {{ $('On form submission').item.json[\"Page URL\"] }}",
        "message": "Kindly find the report in the attachment of this email.",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {
                "property": "technical-seo-report.pdf"
              }
            ]
          }
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1180,
        780
      ],
      "id": "814ed330-33d2-4db2-bef5-f175a04ddba8",
      "name": "Email the Document1",
      "webhookId": "874bbede-3ee6-49b5-9f8f-5b03e9b3bce4",
      "disabled": true
    },
    {
      "parameters": {
        "url": "={{ $json['Page URL'] }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "text"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -200,
        480
      ],
      "id": "2f2ed4bc-f6a6-414e-88da-a7565549066d",
      "name": "Get Website HTML"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are an SEO specialist responsible for conducting On-Page SEO. \n\nRespond in a JSON format that is compatible with the following carbone template format:\n{d.titlemain}\n{d.intromain}\n\n{d.criticaltitle}\n{d.critlist[i]}\n{d.critlist[i+1]}\n\n\n{d.mediumtitle}\n{d.mediumlist[i]}\n{d.mediumlist[i+1]}\n\n\n{d.lowtitle}\n{d.lowlist[i]}\n{d.lowlist[i+1]}\n\nUse the lists to fill the critical, medium and low tasks. \n\nProvide feedback on what needs improvement and how, keeping in concise, and organize the points based on severity.\nFind the page HTML below:\n{{ $json.data }}",
        "hasOutputParser": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        100,
        120
      ],
      "id": "24df5b36-efab-4da3-90a6-941d314803d5",
      "name": "On-page Agent",
      "notesInFlow": false
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are an SEO specialist responsible for conducting technical SEO audits on the provided html pages. \n\nRespond in a JSON format that is compatible with the following carbone template format:\n{d.titlemain}\n{d.intromain}\n\n{d.criticaltitle}\n{d.critlist[i]}\n{d.critlist[i+1]}\n\n\n{d.mediumtitle}\n{d.mediumlist[i]}\n{d.mediumlist[i+1]}\n\n\n{d.lowtitle}\n{d.lowlist[i]}\n{d.lowlist[i+1]}\n\nUse the lists to fill the critical, medium and low tasks. \n\nProvide feedback on what needs improvement and how, keeping in concise, and organize the points based on severity.\nFind the page HTML below:\n{{ $json.data }}",
        "hasOutputParser": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        100,
        780
      ],
      "id": "a1eae38d-0922-4714-b02d-6e20aeafdaea",
      "name": "Off-page Agent"
    },
    {
      "parameters": {
        "content": "# Off-page SEO\n",
        "height": 640,
        "width": 1424,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        640
      ],
      "id": "9361e924-13d8-4b59-80c3-2f68a32e37af",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# On-page SEO\n",
        "height": 560,
        "width": 1424,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "67a04149-866e-4807-a1e2-d515bd363525",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://carbone:4000/render/<templateID Here>",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <Token Here>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"data\": {{ JSON.stringify($json[\"output\"]) }},\n  \"convertTo\": \"pdf\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        600,
        120
      ],
      "id": "23b7003b-ef37-401b-ba37-ac37fbb8f238",
      "name": "Generate Template Using JSON"
    },
    {
      "parameters": {
        "url": "=http://carbone:4000/render/{{ $json.data.renderId }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "on-page-seo-report.pdf"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        120
      ],
      "id": "e321712e-79a7-4d90-b17c-aaf9f43a4ece",
      "name": "Get Rendered Template"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://carbone:4000/render/<templateID Here>",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <Token Here>"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"data\": {{ JSON.stringify($json[\"output\"]) }},\n  \"convertTo\": \"pdf\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        560,
        780
      ],
      "id": "2b5f9bd3-8746-4df7-b785-042b2091b8bf",
      "name": "Generate Template Using JSON1"
    },
    {
      "parameters": {
        "url": "=http://carbone:4000/render/{{ $json.data.renderId }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "technical-seo-report.pdf"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        780
      ],
      "id": "2f6c4259-df53-498d-846f-04ef21701e64",
      "name": "Get Rendered Template1"
    },
    {
      "parameters": {
        "content": "## Replace the token and render ID here",
        "height": 288,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        520,
        20
      ],
      "id": "ea2fb978-a387-4248-b065-7d012720f370",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Replace the token and render ID here",
        "height": 288,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        480,
        660
      ],
      "id": "3ec9facf-612e-47a8-b312-516525cfae51",
      "name": "Sticky Note3"
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Get Website HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "On-page Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Off-page Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "On-page Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Off-page Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Website HTML": {
      "main": [
        [
          {
            "node": "On-page Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Off-page Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On-page Agent": {
      "main": [
        [
          {
            "node": "Generate Template Using JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Off-page Agent": {
      "main": [
        [
          {
            "node": "Generate Template Using JSON1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Template Using JSON": {
      "main": [
        [
          {
            "node": "Get Rendered Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Rendered Template": {
      "main": [
        [
          {
            "node": "Email the Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Rendered Template1": {
      "main": [
        [
          {
            "node": "Email the Document1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "98e8ce22-ea72-4f18-9520-a8ac4354d2ea",
  "meta": {
    "instanceId": "3ec4d9a6a6203fe24d19f4fa491545bb4135e6318931bfc401b1b9271fa6bde5"
  },
  "id": "K1SsmRgU9lSpZbQk",
  "tags": []
}