{
  "openruna_format": "flow-graph-v1",
  "title": "Generate Instagram Content from Top Trends with AI Image Generation",
  "slug": "generate-instagram-content-from-top-trends-with-ai-image-generation",
  "source_filename": "1470_Telegram_Code_Create_Webhook.json",
  "nodes": [
    {
      "id": "If media status is finished",
      "name": "If media status is finished",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "If media status is finished1",
      "name": "If media status is finished1",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Telegram",
      "name": "Telegram",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Telegram1",
      "name": "Telegram1",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Telegram2",
      "name": "Telegram2",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Loop Over Items",
      "name": "Loop Over Items",
      "integration": "splitInBatches",
      "kind": "logic"
    },
    {
      "id": "Schedule Trigger1",
      "name": "Schedule Trigger1",
      "integration": "schedule",
      "kind": "trigger"
    },
    {
      "id": "Telegram Params",
      "name": "Telegram Params",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Instagram params",
      "name": "Instagram params",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Rapid Api params",
      "name": "Rapid Api params",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "filter the image content",
      "name": "filter the image content",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "get top trends on instagram #blender3d",
      "name": "get top trends on instagram #blender3d",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "get top trends on instagram #isometric",
      "name": "get top trends on instagram #isometric",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "merge the array content",
      "name": "merge the array content",
      "integration": "merge",
      "kind": "logic"
    },
    {
      "id": "Check Data on Database Is Exist",
      "name": "Check Data on Database Is Exist",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "If Data is Exist",
      "name": "If Data is Exist",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "send error message to telegram",
      "name": "send error message to telegram",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "insert data on db",
      "name": "insert data on db",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "Analyze Image and give the content",
      "name": "Analyze Image and give the content",
      "integration": "@n8n/n8n-nodes-langchain.openAi",
      "kind": "action"
    },
    {
      "id": "Analyze Content And Generate Instagram Caption",
      "name": "Analyze Content And Generate Instagram Caption",
      "integration": "@n8n/n8n-nodes-langchain.openAi",
      "kind": "action"
    },
    {
      "id": "Prepare data on Instagram",
      "name": "Prepare data on Instagram",
      "integration": "facebookGraphApi",
      "kind": "action"
    },
    {
      "id": "Check Status Of Media Before Uploaded",
      "name": "Check Status Of Media Before Uploaded",
      "integration": "facebookGraphApi",
      "kind": "action"
    },
    {
      "id": "Publish Media on Instagram",
      "name": "Publish Media on Instagram",
      "integration": "facebookGraphApi",
      "kind": "action"
    },
    {
      "id": "Check status of post",
      "name": "Check status of post",
      "integration": "facebookGraphApi",
      "kind": "action"
    },
    {
      "id": "filter the image content-2",
      "name": "filter the image content-2",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Replicate params",
      "name": "Replicate params",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Generate image on flux",
      "name": "Generate image on flux",
      "integration": "httpRequest",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "Loop Over Items",
      "to": "Check Data on Database Is Exist"
    },
    {
      "from": "Telegram Params",
      "to": "Rapid Api params"
    },
    {
      "from": "If Data is Exist",
      "to": "Loop Over Items"
    },
    {
      "from": "If Data is Exist",
      "to": "insert data on db"
    },
    {
      "from": "Instagram params",
      "to": "Telegram Params"
    },
    {
      "from": "Rapid Api params",
      "to": "get top trends on instagram #isometric"
    },
    {
      "from": "Rapid Api params",
      "to": "get top trends on instagram #blender3d"
    },
    {
      "from": "Replicate params",
      "to": "Instagram params"
    },
    {
      "from": "Schedule Trigger1",
      "to": "Replicate params"
    },
    {
      "from": "insert data on db",
      "to": "Analyze Image and give the content"
    },
    {
      "from": "Check status of post",
      "to": "If media status is finished1"
    },
    {
      "from": "Generate image on flux",
      "to": "Prepare data on Instagram"
    },
    {
      "from": "merge the array content",
      "to": "Loop Over Items"
    },
    {
      "from": "filter the image content",
      "to": "merge the array content"
    },
    {
      "from": "Prepare data on Instagram",
      "to": "Check Status Of Media Before Uploaded"
    },
    {
      "from": "Publish Media on Instagram",
      "to": "Check status of post"
    },
    {
      "from": "filter the image content-2",
      "to": "merge the array content"
    },
    {
      "from": "If media status is finished",
      "to": "Publish Media on Instagram"
    },
    {
      "from": "If media status is finished",
      "to": "Telegram"
    },
    {
      "from": "If media status is finished1",
      "to": "Telegram1"
    },
    {
      "from": "If media status is finished1",
      "to": "Telegram2"
    },
    {
      "from": "Check Data on Database Is Exist",
      "to": "If Data is Exist"
    },
    {
      "from": "Check Data on Database Is Exist",
      "to": "send error message to telegram"
    },
    {
      "from": "Analyze Image and give the content",
      "to": "Analyze Content And Generate Instagram Caption"
    },
    {
      "from": "Check Status Of Media Before Uploaded",
      "to": "If media status is finished"
    },
    {
      "from": "get top trends on instagram #isometric",
      "to": "filter the image content"
    },
    {
      "from": "get top trends on instagram #blender3d",
      "to": "filter the image content-2"
    },
    {
      "from": "Analyze Content And Generate Instagram Caption",
      "to": "Generate image on flux"
    }
  ]
}