{
  "name": "✍️ AI agent to create Linkedin posts for blog promotion with GPT-4o",
  "nodes": [
    {
      "id": "4815105b-4175-45ad-85bc-07917de9526c",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -140,
        -720
      ]
    },
    {
      "id": "b8f2a706-4868-4f0d-99a1-c31e1f7022e3",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1220,
        -580
      ]
    },
    {
      "id": "ac1538f6-67ef-4fd0-b4a9-d44b49149e5f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1160,
        -420
      ]
    },
    {
      "id": "bac79ecf-b92d-42ba-bb0f-f1e1f85ca1c9",
      "name": "Clean HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        780,
        -620
      ]
    },
    {
      "id": "fa57b494-370a-4f37-bcbe-38ba6138da76",
      "name": "Extract Blog Posts",
      "type": "n8n-nodes-base.ghost",
      "position": [
        80,
        -720
      ]
    },
    {
      "id": "dc19b6a4-fa17-41b4-8f8c-352519f07569",
      "name": "Extract Post Content",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        -720
      ]
    },
    {
      "id": "45656e13-5f03-48f9-8422-0ea3993e3289",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        -1080
      ],
      "parameters": {
        "width": 200,
        "height": 520,
        "content": "### 1. Workflow Trigger\nThis workflow uses simple trigger.\n\n#### How to setup?\n*Nothing to do.*\n"
      }
    },
    {
      "id": "7b8c3c49-069f-464b-acd2-a1a047fb2138",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        -1080
      ],
      "parameters": {
        "width": 400,
        "height": 520,
        "content": "### 2. Extract Blog Posts Content\nThe Ghost node extracts all the posts of your blog with content and metadata. In the second node, we extract description, URL, content and features image url.\n\n#### H"
      }
    },
    {
      "id": "0a5e4045-7df2-4713-a475-509844c58344",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -1080
      ],
      "parameters": {
        "width": 1520,
        "height": 800,
        "content": "### 3. Generate a Linkedin Post for each Post with an AI Agent\nThis block loops through all the posts pulled by the Ghost Node, send the content to the AI agent that generates a Linkedin post. The res"
      }
    },
    {
      "id": "29b09c7f-c39c-414d-b9d5-897b0d540328",
      "name": "Record the posts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        -480
      ]
    },
    {
      "id": "6f1c58db-a4bf-421a-a182-8149dac28725",
      "name": "Merge Linkedin",
      "type": "n8n-nodes-base.merge",
      "position": [
        1600,
        -720
      ]
    },
    {
      "id": "ebae3ccc-2727-44d9-9309-320c7d8e8349",
      "name": "Add Clean HTML",
      "type": "n8n-nodes-base.merge",
      "position": [
        1020,
        -720
      ]
    },
    {
      "id": "d839ca8d-f898-4617-955f-9c6d9a5412b7",
      "name": "Loop Over Posts",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        580,
        -720
      ]
    },
    {
      "id": "7e759203-b524-4cc5-89df-5e113c800504",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        -540
      ],
      "parameters": {
        "width": 660,
        "height": 460,
        "content": "### [📺Complete Tutorial](https://www.youtube.com/watch?v=Lhi6hV6rWEo)\n![Thumbnail](https://www.samirsaci.com/content/images/2025/04/temp-4.png)\n"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Merge Linkedin",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Clean HTML": {
      "main": [
        [
          {
            "node": "Add Clean HTML",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Add Clean HTML": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Linkedin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Linkedin": {
      "main": [
        [
          {
            "node": "Record the posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Posts": {
      "main": [
        [],
        [
          {
            "node": "Clean HTML",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add Clean HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Record the posts": {
      "main": [
        [
          {
            "node": "Loop Over Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Blog Posts": {
      "main": [
        [
          {
            "node": "Extract Post Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Post Content": {
      "main": [
        [
          {
            "node": "Loop Over Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Extract Blog Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}