{
  "name": "Generate blog posts and social media content with GPT-4.1 and Pexels images",
  "nodes": [
    {
      "id": "08ee8372-2a74-43a7-bf7c-36e2bc1e9b99",
      "name": "Pexels Image Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        928,
        -144
      ]
    },
    {
      "id": "a3c48b24-cc90-40c8-a8c6-5441c6fa5c1b",
      "name": "Create Content with AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        208,
        -144
      ]
    },
    {
      "id": "0cd1c513-9fa3-41dd-85ec-a682bb7fd0f6",
      "name": "Find suitable content keyword",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        576,
        -144
      ]
    },
    {
      "id": "987a945c-52f8-4a31-a775-d4164e9c2cd6",
      "name": "Create Suitable Content Including Image",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1248,
        -144
      ]
    },
    {
      "id": "9fdc71f7-28f1-4514-af43-6e1d4afcc96b",
      "name": "Extract Content and Image Keyword",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        368
      ]
    },
    {
      "id": "9217d3c5-b98b-47c9-8bca-0fe7feb4cdf9",
      "name": "View the Result",
      "type": "n8n-nodes-base.html",
      "position": [
        1808,
        -144
      ]
    },
    {
      "id": "9594253b-72fb-4143-a8ee-b14d1de3770b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -464
      ],
      "parameters": {
        "width": 512,
        "height": 752,
        "content": "## AI Content Generator with Auto Pexels Image Matching\n\n### How it works\n1. Submit your content topic or keyword through the form.\n2. AI will generate initial content based on your input.\n3. The AI e"
      }
    },
    {
      "id": "705d85d0-a6d9-47d4-9c8f-a41d1ee48aca",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -32,
        -144
      ]
    },
    {
      "id": "ecf2e07b-a940-4b39-818a-184d03922b59",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -272
      ],
      "parameters": {
        "width": 608,
        "height": 448,
        "content": "## 1.Create RAW content from the the user's input"
      }
    },
    {
      "id": "aa56198c-6e04-4b2e-b2b0-5df87c0655bc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -272
      ],
      "parameters": {
        "width": 528,
        "height": 320,
        "content": "## 2. Generate suitable image for the content"
      }
    },
    {
      "id": "5313814c-13a4-448d-9acf-ceda614c4725",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -272
      ],
      "parameters": {
        "width": 448,
        "height": 464,
        "content": "## 3. Regenerate the content with picture and HTML format"
      }
    },
    {
      "id": "e8113386-da96-425c-bb59-446ef8af0df2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        -272
      ],
      "parameters": {
        "width": 448,
        "height": 320,
        "content": "## 4. Get the results"
      }
    },
    {
      "id": "18834b61-2e26-4f30-9186-c5f65a9fa1f0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        304
      ],
      "parameters": {
        "width": 608,
        "height": 448,
        "content": "## Alternative way to optimize token usage"
      }
    },
    {
      "id": "667a4a51-b737-4e23-a3ba-fbaa46c9fa29",
      "name": "Create Content and Find Suitable Image",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -16,
        368
      ]
    },
    {
      "id": "6d5962ea-1fe2-4912-9fb9-c13554bb753d",
      "name": "OpenAI 4.1 mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        208,
        48
      ]
    },
    {
      "id": "7dde863b-2bfc-4662-a243-6b08116af161",
      "name": "OpenAi 4.1 Mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1248,
        64
      ]
    },
    {
      "id": "98788352-0fc3-4a06-ba84-24dd0343b6da",
      "name": "OpenAI 4.1 mini for Content and Image",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -16,
        560
      ]
    }
  ],
  "connections": {
    "OpenAI 4.1 mini": {
      "ai_languageModel": [
        [
          {
            "node": "Create Content with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAi 4.1 Mini": {
      "ai_languageModel": [
        [
          {
            "node": "Create Suitable Content Including Image",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Create Content with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pexels Image Search": {
      "main": [
        [
          {
            "node": "Create Suitable Content Including Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Content with AI": {
      "main": [
        [
          {
            "node": "Find suitable content keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find suitable content keyword": {
      "main": [
        [
          {
            "node": "Pexels Image Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Content and Image Keyword": {
      "main": [
        []
      ]
    },
    "OpenAI 4.1 mini for Content and Image": {
      "ai_languageModel": [
        [
          {
            "node": "Create Content and Find Suitable Image",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create Content and Find Suitable Image": {
      "main": [
        [
          {
            "node": "Extract Content and Image Keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Suitable Content Including Image": {
      "main": [
        [
          {
            "node": "View the Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}