{
  "name": "Process Image Auto segmentation & Detection with VLM Run, Drive-Telegram Sharing",
  "nodes": [
    {
      "id": "0cf90016-2ac7-4109-8d36-60e14d9cd69e",
      "name": "Upload Image",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        32,
        496
      ]
    },
    {
      "id": "81f0f027-e52c-4c1f-af8e-0ad7650d7452",
      "name": "Send Image",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1344,
        432
      ]
    },
    {
      "id": "07ba8942-4b77-4553-8102-208e4ccdd817",
      "name": "Upload File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1344,
        224
      ]
    },
    {
      "id": "983d6f4c-de32-47a8-8e06-5e5c81ee5826",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -16
      ],
      "parameters": {
        "width": 432,
        "height": 640,
        "content": "# 🧠 Image Segmentation & Object Detection  \n\nThis workflow processes uploaded files using **VLM Run**, extracts signed URLs, downloads results, and distributes them across multiple services automatica"
      }
    },
    {
      "id": "a3388528-c890-4fd3-a41e-ffeb9223e13b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -16
      ],
      "parameters": {
        "width": 496,
        "height": 640,
        "content": "# 🟤 VLM Run Agents & Webhooks\n\n- **VLM Run (Segmentation)** and **VLM Run (Detection)** agents process uploaded images.\n- Each agent sends results asynchronously to their respective **Webhook nodes**."
      }
    },
    {
      "id": "10f43c1f-63f8-4202-9c56-19263bed234e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        112
      ],
      "parameters": {
        "width": 464,
        "height": 512,
        "content": "# 🟪 Artifact Handling\n\n- Extract generated image/video IDs from VLM Run response.\n  - Plain: img_182573\n  - With tags: img_c7ae8c\n- Fetch artifacts using:\n  - Get Image Artifact → img_* ID\n- Artifacts"
      }
    },
    {
      "id": "5a71c76b-b467-4306-8411-5478085e500a",
      "name": "Webhook for Segmented Image",
      "type": "n8n-nodes-base.webhook",
      "position": [
        608,
        304
      ]
    },
    {
      "id": "3414f9da-0634-4cab-b405-dbe9bd3069f1",
      "name": "Webhook for Detected Image",
      "type": "n8n-nodes-base.webhook",
      "position": [
        608,
        480
      ]
    },
    {
      "id": "553f65b2-803c-4062-94b3-f6e0702073bd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1552,
        112
      ],
      "parameters": {
        "width": 368,
        "height": 512,
        "content": "# 🟩 Upload to Drive & Send via Telegram\n\n- The downloaded image is uploaded to **Google Drive** under the specified folder.\n- **Google Drive OAuth2** credentials are required with upload permissions.\n"
      }
    },
    {
      "id": "eac2acae-bdac-48fa-913c-01e81bd4c1a5",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        112
      ],
      "parameters": {
        "width": 304,
        "height": 512,
        "content": ""
      }
    },
    {
      "id": "af8fb977-457d-4124-9574-faf10feed0e7",
      "name": "VLM Run (Detection)",
      "type": "@vlm-run/n8n-nodes-vlmrun.vlmRun",
      "position": [
        352,
        480
      ]
    },
    {
      "id": "da2f6847-4764-4c6e-a2a7-6ecffacdf3c2",
      "name": "VLM Run (Segmentation)",
      "type": "@vlm-run/n8n-nodes-vlmrun.vlmRun",
      "position": [
        352,
        304
      ]
    },
    {
      "id": "bcca0b4c-afee-4316-acaa-4a388c853404",
      "name": "Get Image Artifact",
      "type": "@vlm-run/n8n-nodes-vlmrun.vlmRun",
      "position": [
        960,
        432
      ]
    }
  ],
  "connections": {
    "Upload Image": {
      "main": [
        [
          {
            "node": "VLM Run (Detection)",
            "type": "main",
            "index": 0
          },
          {
            "node": "VLM Run (Segmentation)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image Artifact": {
      "main": [
        [
          {
            "node": "Upload File",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook for Detected Image": {
      "main": [
        [
          {
            "node": "Get Image Artifact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook for Segmented Image": {
      "main": [
        [
          {
            "node": "Get Image Artifact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}