{
  "name": "Generate Instagram posts with AI quotes & images using GPT & Gemini",
  "nodes": [
    {
      "id": "fda4cf10-8bc2-490c-8412-eaef0dd637f4",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2128,
        -288
      ]
    },
    {
      "id": "c17de175-e95e-4e88-bd42-52851656e3ba",
      "name": "Read Text Files from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        432,
        -288
      ]
    },
    {
      "id": "f1bf713b-05bb-4a19-a80f-fe201833f4fa",
      "name": "Extract from Text File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        656,
        -288
      ]
    },
    {
      "id": "6f59e757-00c4-4605-b54f-cb9808ea7528",
      "name": "Convert Quote to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1456,
        -288
      ]
    },
    {
      "id": "df525ede-df99-49c2-a5e5-ae67b38ee9ff",
      "name": "Generate an image",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1904,
        -288
      ]
    },
    {
      "id": "2c3dedaa-9791-44c5-9b20-fcbada1f3658",
      "name": "Write Text Files from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1680,
        -288
      ]
    },
    {
      "id": "9df5aee8-c071-4eea-885d-32efe21e1b67",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -832
      ],
      "parameters": {
        "width": 624,
        "height": 1120,
        "content": "# 📸 Instagram Post Automation Workflow\n\n## ℹ️ What is this workflow\nThis workflow automatically produces daily Instagram posts based on a user-provided prompt and sends them to your email inbox.  \nSoc"
      }
    },
    {
      "id": "704ea445-c717-4adc-8211-3d7914d9d841",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        880,
        -288
      ]
    },
    {
      "id": "eae5a242-b569-4cd4-8b34-4e29efc763dd",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        880,
        -64
      ]
    },
    {
      "id": "9691f4f7-be6f-421a-adcc-60e2244a673b",
      "name": "Code-Split-LangChain",
      "type": "n8n-nodes-base.code",
      "position": [
        1232,
        -288
      ]
    },
    {
      "id": "65ea98d7-335b-449f-a176-6bb1842fe888",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        208,
        -288
      ]
    },
    {
      "id": "dc4cc876-bb3a-4615-9e0b-d51cde616046",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        -512
      ],
      "parameters": {
        "width": 560,
        "height": 592,
        "content": "# 2. Quote Generation\n\n* Use Model to generate a new quote\n* Split outcome to Quote, Caption and Hashtag for the next step"
      }
    },
    {
      "id": "20f471e4-32dd-4d07-bce6-52cef13320c8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        -512
      ],
      "parameters": {
        "width": 432,
        "height": 512,
        "content": "# 3. Save new Quote\n\n* save new quote to the file for the next run"
      }
    },
    {
      "id": "fac18206-c76e-4045-8ccb-71b1640302cb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -512
      ],
      "parameters": {
        "width": 544,
        "height": 512,
        "content": "# 4. Image Generation and Send Email\n\n* Generate Image based on quote\n* Send email by attach the generated image and include Quote, Caption and Hashtag"
      }
    },
    {
      "id": "3104990d-c570-47d2-826a-68ec886bac28",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -512
      ],
      "parameters": {
        "width": 672,
        "height": 512,
        "content": "# 1. Initial Stage\n\n* Schedule node is running the workflow periodically based on user configuration\n* Next node read all previous generated quotes and convert it to JSON format for the next step to a"
      }
    },
    {
      "id": "e7cc6bba-55d0-4b42-a26f-8a7ff84d6c1a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -144
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "Update System and User Prompt Based on your needs"
      }
    },
    {
      "id": "9c1bc39c-4dec-413f-a37f-dddb0fb87a08",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 80,
        "content": "Update User Prompt if you need to change the image generation style"
      }
    },
    {
      "id": "781a8396-7098-4724-920c-d3258511862b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        -112
      ],
      "parameters": {
        "width": 208,
        "height": 80,
        "content": "Update receiver email address field"
      }
    }
  ],
  "connections": {
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Code-Split-LangChain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Read Text Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code-Split-LangChain": {
      "main": [
        [
          {
            "node": "Convert Quote to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Quote to File": {
      "main": [
        [
          {
            "node": "Write Text Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from Text File": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Text Files from Disk": {
      "main": [
        [
          {
            "node": "Extract from Text File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Text Files from Disk": {
      "main": [
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}