{
  "name": "AI-powered Loom video Q&A with Gemini-2.5 and Slack notifications",
  "nodes": [
    {
      "id": "1b69f192-6e52-4484-8953-285441906bde",
      "name": "Extract Video ID",
      "type": "n8n-nodes-base.set",
      "position": [
        600,
        -420
      ]
    },
    {
      "id": "96a1f9d1-41da-4f73-aef1-5fc61a2ecbde",
      "name": "Fetch Download URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        820,
        -425
      ]
    },
    {
      "id": "983e0686-6a65-495c-af5c-103001995271",
      "name": "Download Video Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        -420
      ]
    },
    {
      "id": "9426bf71-eb18-419f-a693-a7b5832956a6",
      "name": "Loom URL Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        160,
        -420
      ]
    },
    {
      "id": "a7331691-acda-4191-add6-65ab1f61b1d5",
      "name": "Upload Video Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2360,
        -425
      ]
    },
    {
      "id": "c24fb0b7-d21f-4fe7-bed4-b0e2ecd0c2b2",
      "name": "Start Upload Session for Gemini",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1700,
        -500
      ]
    },
    {
      "id": "e92b0b3d-e309-44b3-a288-2fea8f50c695",
      "name": "Valid Loom URL?",
      "type": "n8n-nodes-base.if",
      "position": [
        380,
        -420
      ]
    },
    {
      "id": "3180c3a0-b5cc-4501-80ed-2ebce9463af2",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2140,
        -425
      ]
    },
    {
      "id": "5c1a814e-041b-456d-89f2-22a1845d6693",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1480,
        -420
      ]
    },
    {
      "id": "51021cc5-971d-4287-be7f-d102ccb2505f",
      "name": "Extract File Details",
      "type": "n8n-nodes-base.set",
      "position": [
        2580,
        -420
      ]
    },
    {
      "id": "a0b210dc-4d66-45eb-a1f6-526297049bea",
      "name": "Wait 5 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        3060,
        -400
      ]
    },
    {
      "id": "e36643d5-5102-4ef9-99ce-3777d38d0f16",
      "name": "Loop Until Video Is Active",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2800,
        -425
      ]
    },
    {
      "id": "6496a5f2-b52a-4f68-bfef-09788e36aac1",
      "name": "Get Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3240,
        -400
      ]
    },
    {
      "id": "4a822835-719f-46aa-8f0e-1715af385f7a",
      "name": "Video Active?",
      "type": "n8n-nodes-base.if",
      "position": [
        3460,
        -400
      ]
    },
    {
      "id": "9e78e6d5-435c-4c8a-8cd4-64f0c5e4ff7f",
      "name": "Ask Gemini to Summarize Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3740,
        -460
      ]
    },
    {
      "id": "77df9ffb-2a4d-46c9-a2a1-44eaf1f7a734",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -640
      ],
      "parameters": {
        "width": 1080,
        "height": 420,
        "content": "## Download Loom Video\n\nEnter loom video url via form, then make requests to loom api to get url of video and then download."
      }
    },
    {
      "id": "89545746-96c1-4896-95bf-c5bca17b1ef3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -640
      ],
      "parameters": {
        "width": 1300,
        "height": 420,
        "content": "## Upload Video to Gemini\n\nExtract data from video needed for upload to Gemini. Then start an authenticated upload session, get the url to upload to and upload the video."
      }
    },
    {
      "id": "f35ceb48-2931-47b5-835a-bf3cfbec813b",
      "name": "Extract URL for Uploading",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        -500
      ]
    },
    {
      "id": "02cff2c4-5f4f-4422-acc8-bb5e6a125365",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2500,
        -640
      ],
      "parameters": {
        "width": 1120,
        "height": 420,
        "content": "## Ensure Video Is Active Before Using with LLM Request\n\nUploaded videos start in \"PROCESSING\" state when first uploaded and need to be \"ACTIVE\" before they can be provided to a Gemini LLM request."
      }
    },
    {
      "id": "9f457708-2b80-403e-8030-1dbdbc81bc54",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3620,
        -640
      ],
      "parameters": {
        "width": 580,
        "height": 420,
        "content": "## Send Request to Gemini LLM\n\nOnce video is active, send video to Gemini with prompt from the form"
      }
    },
    {
      "id": "33800aac-7646-40ce-98b2-213f48f91ad8",
      "name": "Calculate File Size",
      "type": "n8n-nodes-base.code",
      "position": [
        1240,
        -520
      ]
    },
    {
      "id": "e6fdc875-2fde-4da3-8330-11e72ba02d33",
      "name": "Set Video Attributes",
      "type": "n8n-nodes-base.set",
      "position": [
        1240,
        -360
      ]
    },
    {
      "id": "3ae06fca-7edb-4949-a9e7-588256ffddd0",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        4020,
        -460
      ]
    },
    {
      "id": "b564cf3b-1fd7-4b4d-9fda-1e5ba2842224",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -640
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "## How to use the workflow\nThis workflow takes a Loom link, extracts the video ID, uses the Loom API to download the video, then sends it to Gemini along with your question. Finally, it sends the outp"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Upload Video Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Start Upload Session for Gemini",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loom URL Form": {
      "main": [
        [
          {
            "node": "Valid Loom URL?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Active?": {
      "main": [
        [
          {
            "node": "Loop Until Video Is Active",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 5 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5 Seconds": {
      "main": [
        [
          {
            "node": "Get Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Valid Loom URL?": {
      "main": [
        [
          {
            "node": "Extract Video ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Video ID": {
      "main": [
        [
          {
            "node": "Fetch Download URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Status": {
      "main": [
        [
          {
            "node": "Video Active?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video Data": {
      "main": [
        [
          {
            "node": "Extract File Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Download URL": {
      "main": [
        [
          {
            "node": "Download Video Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate File Size": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract File Details": {
      "main": [
        [
          {
            "node": "Loop Until Video Is Active",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Video Attributes": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Download Video Content": {
      "main": [
        [
          {
            "node": "Calculate File Size",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set Video Attributes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract URL for Uploading": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Until Video Is Active": {
      "main": [
        [
          {
            "node": "Ask Gemini to Summarize Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 5 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask Gemini to Summarize Video": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Upload Session for Gemini": {
      "main": [
        [
          {
            "node": "Extract URL for Uploading",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}