{
  "name": "Generate AI News LinkedIn Posts with GPT-4o-mini, NewsAPI, and Qdrant",
  "nodes": [
    {
      "id": "f12fb93e-7d7d-4f99-9e30-112e02237cd3",
      "name": "Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -1340
      ],
      "parameters": {
        "width": 580,
        "height": 100,
        "content": "# AI Article Generator with Qdrant\n1. Edit 'Set Input Data' node with your topic, company, and tone.\n2. Retrieves company data from Qdrant using RAG.\n3. Fetches recent news using NewsAPI.\n4. Generates"
      }
    },
    {
      "id": "d17ff0dc-914f-4c9b-b984-5179fb688b81",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -560,
        -620
      ]
    },
    {
      "id": "1ce01576-ef29-41ed-a97e-cdc296917239",
      "name": "Split Articles",
      "type": "n8n-nodes-base.code",
      "position": [
        120,
        -660
      ]
    },
    {
      "id": "8bdb2b9a-a57b-4d64-ad17-aaf2bbcd1119",
      "name": "News API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -60,
        -660
      ]
    },
    {
      "id": "4dface60-cd99-48d6-9b6a-49b8dcc5c552",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -900,
        -100
      ]
    },
    {
      "id": "4014f595-46fd-4fa2-8771-61027cdcfe16",
      "name": "Gmail1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -380,
        -240
      ]
    },
    {
      "id": "fdaf2818-d4f0-4108-b598-96ea88e89a09",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        -740,
        -280
      ]
    },
    {
      "id": "9182a1ad-49d5-4fc2-b55d-8633dd0e9834",
      "name": "confirmation",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -460,
        320
      ]
    },
    {
      "id": "251e95a1-3bfe-4ef1-b105-0a3d9b36c1cb",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        140,
        120
      ]
    },
    {
      "id": "db8c4c3f-f2bf-4a2a-a5ed-4d5243b59185",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        60,
        -60
      ]
    },
    {
      "id": "e7b449b3-53d6-449b-9772-c0925b553e91",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        800,
        -20
      ]
    },
    {
      "id": "fbe9396a-66f7-411a-a19d-44425dccf8c0",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        80,
        -60
      ]
    },
    {
      "id": "0092d297-df30-4ca3-96ed-f5dded80926a",
      "name": "Unread",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -440,
        20
      ]
    },
    {
      "id": "3b59e60e-45df-4de5-82a0-592e3d609c75",
      "name": "Set Input Data (Topic/Company/Tone)",
      "type": "n8n-nodes-base.set",
      "position": [
        -320,
        -620
      ]
    },
    {
      "id": "ae60f9ec-fdf8-40f0-b73b-c9c3c2fe55fd",
      "name": "Send Email with News Articles",
      "type": "n8n-nodes-base.gmail",
      "position": [
        360,
        -660
      ]
    },
    {
      "id": "55940722-dfbd-4807-99f7-d6d32d05d20a",
      "name": "Log Email Activity",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        580,
        -660
      ]
    },
    {
      "id": "ab44e274-8c67-493f-8968-2f6d841e79fc",
      "name": "Capture Email Decision",
      "type": "n8n-nodes-base.set",
      "position": [
        -180,
        140
      ]
    },
    {
      "id": "865cf8c6-565c-4a9b-b976-417ae7165d84",
      "name": "Retrieve the message",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -680,
        -100
      ]
    },
    {
      "id": "3120723e-7bf8-4896-8fb3-93d526765461",
      "name": "Generate Linkedin Posts",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        800,
        -240
      ]
    },
    {
      "id": "dfb952de-546d-4541-9bf7-d62ca6f5544e",
      "name": "Generate Vector Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1100,
        140
      ]
    },
    {
      "id": "efd07f78-e8a3-4d82-a355-f200be1f4b0b",
      "name": "Publish LinkedIn Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1560,
        -100
      ]
    },
    {
      "id": "ec510882-812b-4b4e-8a29-3e8b799f3424",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -780
      ],
      "parameters": {
        "width": 1940,
        "height": 320,
        "content": "# News digest with article summaries\n"
      }
    },
    {
      "id": "9ee79293-12d6-4542-9a31-444d8ed8a7da",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        -380
      ],
      "parameters": {
        "width": 1640,
        "height": 900,
        "content": "# Get decision and the articles from email\n"
      }
    },
    {
      "id": "cba603cb-7d72-46d0-82cb-474c1a29a3d8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        -380
      ],
      "parameters": {
        "width": 1000,
        "height": 820,
        "content": "# Generate the Linkedin Post"
      }
    },
    {
      "id": "8e22b721-99f5-4dda-96ad-d9e9a258ed12",
      "name": "RetrievePostExamples",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1100,
        -20
      ]
    },
    {
      "id": "3ade436d-a77b-4d01-87f8-1186a93cc1a5",
      "name": "ExtractLatestEmail2",
      "type": "n8n-nodes-base.code",
      "position": [
        -120,
        -280
      ]
    },
    {
      "id": "19c15ab2-5be6-433c-9cbb-ddbcbef6720d",
      "name": "FormatLinkedInPayload",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        -200
      ]
    },
    {
      "id": "7e3aa544-9db6-462d-a6a7-284c206064c5",
      "name": "Set Linkedin Id",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        -380
      ]
    },
    {
      "id": "14cd9288-9687-4b82-816b-cd8ab3127e17",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1460,
        -220
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Generate Linkedin Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail1": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Publish LinkedIn Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unread": {
      "main": [
        [
          {
            "node": "Gmail1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "News API": {
      "main": [
        [
          {
            "node": "Split Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "ExtractLatestEmail2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "confirmation": {
      "main": [
        [
          {
            "node": "Capture Email Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Retrieve the message",
            "type": "main",
            "index": 0
          },
          {
            "node": "confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Articles": {
      "main": [
        [
          {
            "node": "Send Email with News Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Linkedin Id": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Input Data (Topic/Company/Tone)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Linkedin Posts",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "ExtractLatestEmail2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve the message": {
      "main": [
        [
          {
            "node": "Unread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RetrievePostExamples": {
      "ai_tool": [
        [
          {
            "node": "Generate Linkedin Posts",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "FormatLinkedInPayload": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Publish LinkedIn Post": {
      "main": [
        []
      ]
    },
    "Capture Email Decision": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generate Linkedin Posts": {
      "main": [
        [
          {
            "node": "FormatLinkedInPayload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Linkedin Posts",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Vector Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "RetrievePostExamples",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Send Email with News Articles": {
      "main": [
        [
          {
            "node": "Log Email Activity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Input Data (Topic/Company/Tone)": {
      "main": [
        [
          {
            "node": "News API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}