{
  "name": "Generate AI photos with Gemini & auto-post to FB, Instagram & X with approval",
  "nodes": [
    {
      "id": "2e933da9-aaeb-4ddc-b6f0-314214317df7",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -5104,
        1616
      ]
    },
    {
      "id": "7d75ca43-7772-4113-81e3-84d02f25c85f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -5096,
        1840
      ]
    },
    {
      "id": "07f7f1b1-58ea-44e9-9b8c-3a6899cf9e96",
      "name": "Listen for incoming events",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -6224,
        1616
      ]
    },
    {
      "id": "b8a79511-2241-4813-9ab6-bd516ec75fea",
      "name": "Speech to Text",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -5328,
        1544
      ]
    },
    {
      "id": "aa86f76e-1f3b-4f2c-9738-90f2678abff5",
      "name": "Voice or Text",
      "type": "n8n-nodes-base.set",
      "position": [
        -6000,
        1616
      ]
    },
    {
      "id": "4fd453e3-9ae5-4570-90fb-9e687bd9b6cc",
      "name": "Get Voice File",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -5552,
        1544
      ]
    },
    {
      "id": "8ef16cbc-a946-4267-bcb2-4cb03955f02d",
      "name": "Parse AI Output",
      "type": "n8n-nodes-base.code",
      "position": [
        -4528,
        1304
      ]
    },
    {
      "id": "1d30da0c-c11f-4c69-952e-c3b2a8f36cb3",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -4968,
        1840
      ]
    },
    {
      "id": "b4b7d576-e36e-4b9b-b809-b75f69676378",
      "name": "Upload media1",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2960,
        1304
      ]
    },
    {
      "id": "4f4de877-ae4f-40fd-86ed-70b5b0b54a78",
      "name": "Get post1",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2288,
        1760
      ]
    },
    {
      "id": "1621d441-479b-48fe-b028-96dd4bc4b532",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2512,
        1208
      ]
    },
    {
      "id": "2b5a4c3f-386c-497a-acab-d87b83d3de8e",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2512,
        1760
      ]
    },
    {
      "id": "06800398-9f97-4443-83f2-d07c75076ec7",
      "name": "In Progress?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1840,
        1304
      ]
    },
    {
      "id": "89151a21-5bca-414b-842a-c62c72c5b52a",
      "name": "Give Blotat other 5s :)",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1616,
        1472
      ]
    },
    {
      "id": "46f14a49-461a-4813-8a8b-7bc4cd3821ea",
      "name": "In Progress?1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1840,
        1856
      ]
    },
    {
      "id": "5312ee21-26bc-4af0-bbf7-824bac9bc012",
      "name": "A Voice?",
      "type": "n8n-nodes-base.if",
      "position": [
        -5776,
        1616
      ]
    },
    {
      "id": "7e88f1d7-a27a-466b-b442-d141c85ad4de",
      "name": "Send questions or proposal to user",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4528,
        1712
      ]
    },
    {
      "id": "13b3efe8-954c-4f3d-a5d3-d185a79888ec",
      "name": "Approved from user?",
      "type": "n8n-nodes-base.if",
      "position": [
        -4752,
        1616
      ]
    },
    {
      "id": "197cb765-0cad-415c-a657-44f3edbdb1bc",
      "name": "Inform user about processing",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4304,
        1304
      ]
    },
    {
      "id": "4c8d4dc7-9280-49fc-8edd-29afda445976",
      "name": "Save Prompt & Post-Text",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -4080,
        1304
      ]
    },
    {
      "id": "00b5b8f0-2a5c-4a9a-8d98-f71c4acf4c3d",
      "name": "Check Post Status",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2288,
        1208
      ]
    },
    {
      "id": "1e0c394c-9321-4bf5-b7d6-73dfca816650",
      "name": "Give Blotat more time",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1616,
        2024
      ]
    },
    {
      "id": "180e9c56-a3c5-4e8b-9fd9-f5b3d7b6f721",
      "name": "Published to Instagram?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2064,
        1760
      ]
    },
    {
      "id": "390cb840-69a3-49b8-82f6-8ee64af14c47",
      "name": "Confirm publishing to Instagram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1840,
        1664
      ]
    },
    {
      "id": "864c5c75-62dc-4c0b-9d3c-52fd50c7d0ad",
      "name": "Send Instagram Error Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1616,
        1784
      ]
    },
    {
      "id": "6bc48b4b-83c4-4fc6-b945-f4634ffadfc2",
      "name": "Create x post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2736,
        1208
      ]
    },
    {
      "id": "128dbe37-fca1-41fa-a69e-806c85020070",
      "name": "Generate an image",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        -3856,
        1304
      ]
    },
    {
      "id": "3b76b116-f887-407a-af20-b27753d6e2f7",
      "name": "Send a photo message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3632,
        1400
      ]
    },
    {
      "id": "e04fc160-3405-4ec9-ac2b-eff669820fc4",
      "name": "Send message and wait for response",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3408,
        1400
      ]
    },
    {
      "id": "f4fbfe92-802e-4ffa-854b-6a7f2eac5685",
      "name": "Upload image1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -3632,
        1208
      ]
    },
    {
      "id": "eecea1d6-4266-4c5f-822b-a9b850076d0a",
      "name": "Download image from Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -3408,
        1208
      ]
    },
    {
      "id": "14decf3c-cb8f-4303-9d4c-6a1c4b6b109d",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -3184,
        1304
      ]
    },
    {
      "id": "8cab4cb9-8205-4eed-b1e9-a4fbbe2278b4",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2512,
        728
      ]
    },
    {
      "id": "a5af60d7-e79d-4145-80a8-f4cff82d84e2",
      "name": "In Progress?2",
      "type": "n8n-nodes-base.if",
      "position": [
        -1840,
        752
      ]
    },
    {
      "id": "3ed917a5-3a22-47e0-9ced-db007b3dd789",
      "name": "Give Blotat other 5s :)1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1616,
        920
      ]
    },
    {
      "id": "f719fa6f-0bae-4800-93e5-7f82367794c0",
      "name": "Check Post Status1",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2288,
        728
      ]
    },
    {
      "id": "2d85b82f-efc9-442f-ac30-b6c421483b65",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6304,
        1040
      ],
      "parameters": {
        "width": 1088,
        "height": 800,
        "content": "## 1. Capture Input\n\nReceives Telegram messages and converts voice notes to text using OpenAI Whisper"
      }
    },
    {
      "id": "378d9f45-d952-4882-9f06-b59920b21b47",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5200,
        1040
      ],
      "parameters": {
        "width": 368,
        "height": 800,
        "content": "## 2. AI Content Creation\n\nGenerates LinkedIn posts and handles revision requests through conversational memory"
      }
    },
    {
      "id": "e30ad583-fee4-4217-a591-40e46c623626",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3952,
        1040
      ],
      "parameters": {
        "width": 1200,
        "height": 800,
        "content": "## 4. Photo Generation and upload to [Blotato] \n\nGenerate your Photo mit Gemini-API, approve it via Telegram, save it to your google drive and uploadd it to [Blotato]) "
      }
    },
    {
      "id": "fc202f08-da7f-43d3-a67b-db76725523e7",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2672,
        416
      ],
      "parameters": {
        "width": 1536,
        "height": 592,
        "content": "## 5. Post the Photo on Facebook and monitor the status"
      }
    },
    {
      "id": "e2d66e61-41d3-4cf7-be06-89ae995798b1",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4816,
        1040
      ],
      "parameters": {
        "width": 848,
        "height": 800,
        "content": "## 3. Approval & Publishing\n\nDetects approval keywords, extracts final content, save the output in your google sheet and inform the user"
      }
    },
    {
      "id": "8a727e77-a9bf-4045-9f9b-5b511b1a01c2",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2672,
        1024
      ],
      "parameters": {
        "width": 1536,
        "height": 592,
        "content": "## 6. Post the Photo on X and monitor the status"
      }
    },
    {
      "id": "e940d29a-fbe8-46f2-83d7-ebd14fccd731",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2672,
        1648
      ],
      "parameters": {
        "width": 1536,
        "height": 592,
        "content": "## 7. Post the Photo  on Instagram and monitor the status"
      }
    },
    {
      "id": "de2c8b4d-d71b-47d4-aeb4-be13a7cdd317",
      "name": "Create instagram Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2736,
        1760
      ]
    },
    {
      "id": "0377330a-e387-4f54-ac91-a2e621d5b0de",
      "name": "Create FB post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -2736,
        728
      ]
    },
    {
      "id": "f93d3cb2-65a2-4acf-970d-3a79780afb4c",
      "name": "Published to Facebook ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2064,
        728
      ]
    },
    {
      "id": "a17802ab-6c59-4b0c-8b7b-7df6e804a8d4",
      "name": "Send Facebook Error Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1616,
        704
      ]
    },
    {
      "id": "67a14576-86fb-4d55-b9f5-a402dda55748",
      "name": "Confirm publishing to Facebook",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1840,
        560
      ]
    },
    {
      "id": "eb80d878-5e98-4cf7-92d7-e2864a48d71f",
      "name": "Published to X?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2064,
        1208
      ]
    },
    {
      "id": "63e3c224-becf-4ba0-a2cf-574b32720bfa",
      "name": "Confirm publishing to X",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1840,
        1112
      ]
    },
    {
      "id": "10f3db13-5e7a-44aa-9ade-aa7c3915d236",
      "name": "Send X Error Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1616,
        1232
      ]
    },
    {
      "id": "b31909eb-1813-4258-b51c-0e40afbac569",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7168,
        976
      ],
      "parameters": {
        "width": 736,
        "height": 1040,
        "content": "## 🤖 Social Media Photo Creation Bot with Approval Loop\n\nTransform your Telegram into a **AI Photo Creator**. Send ideas via text or voice, collaborate with AI to refine photos, and publish directly t"
      }
    }
  ],
  "connections": {
    "If1": {
      "main": [
        [
          {
            "node": "Upload media1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get post1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Check Post Status1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "A Voice?": {
      "main": [
        [
          {
            "node": "Get Voice File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Approved from user?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get post1": {
      "main": [
        [
          {
            "node": "Published to Instagram?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "In Progress?": {
      "main": [
        [
          {
            "node": "Give Blotat other 5s :)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send X Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create x post": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "In Progress?1": {
      "main": [
        [
          {
            "node": "Give Blotat more time",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Instagram Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "In Progress?2": {
      "main": [
        [
          {
            "node": "Give Blotat other 5s :)1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Facebook Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload image1": {
      "main": [
        [
          {
            "node": "Download image from Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media1": {
      "main": [
        [
          {
            "node": "Create instagram Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create x post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create FB post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Voice or Text": {
      "main": [
        [
          {
            "node": "A Voice?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create FB post": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Voice File": {
      "main": [
        [
          {
            "node": "Speech to Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Speech to Text": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Output": {
      "main": [
        [
          {
            "node": "Inform user about processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Published to X?": {
      "main": [
        [
          {
            "node": "Confirm publishing to X",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "In Progress?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Post Status": {
      "main": [
        [
          {
            "node": "Published to X?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Upload image1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a photo message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Post Status1": {
      "main": [
        [
          {
            "node": "Published to Facebook ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Approved from user?": {
      "main": [
        [
          {
            "node": "Parse AI Output",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send questions or proposal to user",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a photo message": {
      "main": [
        [
          {
            "node": "Send message and wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Create instagram Post": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Give Blotat more time": {
      "main": [
        [
          {
            "node": "Published to Instagram?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Give Blotat other 5s :)": {
      "main": [
        [
          {
            "node": "Published to X?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Published to Facebook ?": {
      "main": [
        [
          {
            "node": "Confirm publishing to Facebook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "In Progress?2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Published to Instagram?": {
      "main": [
        [
          {
            "node": "Confirm publishing to Instagram",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "In Progress?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Prompt & Post-Text": {
      "main": [
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Give Blotat other 5s :)1": {
      "main": [
        [
          {
            "node": "Published to Facebook ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download image from Drive": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Listen for incoming events": {
      "main": [
        [
          {
            "node": "Voice or Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Inform user about processing": {
      "main": [
        [
          {
            "node": "Save Prompt & Post-Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message and wait for response": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}