问答 vidéo Loom basé sur l'IA (Gemini-2.5 et notifications Slack)

Avancé

Ceci est unAI, IT Opsworkflow d'automatisation du domainecontenant 24 nœuds.Utilise principalement des nœuds comme If, Set, Code, Wait, Merge, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Questions-réponses vidéo Loom basé sur l'IA : utilisation de Gemini-2.5 et des notifications Slack

Prérequis
  • Token Bot Slack ou URL Webhook
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "59761dc282918b63de68f8544bab8098be77f63f00c94bc04dd5d71886f7d2e1",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "1b69f192-6e52-4484-8953-285441906bde",
      "name": "Extraire l'ID Vidéo",
      "type": "n8n-nodes-base.set",
      "position": [
        600,
        -420
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "videoId",
              "value": "={{ $json['Loom Video URL'].split('/').pop().split(\"?\")[0] }}"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "96a1f9d1-41da-4f73-aef1-5fc61a2ecbde",
      "name": "Récupérer l'URL de Téléchargement",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        820,
        -425
      ],
      "parameters": {
        "url": "=https://www.loom.com/api/campaigns/sessions/{{ $json.videoId }}/transcoded-url",
        "method": "POST",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "983e0686-6a65-495c-af5c-103001995271",
      "name": "Télécharger le Contenu Vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        -420
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "9426bf71-eb18-419f-a693-a7b5832956a6",
      "name": "Formulaire d'URL Loom",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        160,
        -420
      ],
      "webhookId": "5c01bf3e-8c98-4311-859e-dac20b35d252",
      "parameters": {
        "options": {},
        "formTitle": "Loom Video Downloader to Gemini",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Loom Video URL",
              "placeholder": "https://www.loom.com/share/4ef793670bfd4b06a7c042b1b439d51a",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Enter a question about the video",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Enter a public loom video url and the video will be downloaded and provided as input to Google Gemini"
      },
      "typeVersion": 2.2
    },
    {
      "id": "a7331691-acda-4191-add6-65ab1f61b1d5",
      "name": "Charger les Données Vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2360,
        -425
      ],
      "parameters": {
        "url": "={{ $json.uploadUrl }}",
        "method": "PUT",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Length",
              "value": "={{ $json.fileSizeInBytes }}"
            },
            {
              "name": "X-Goog-Upload-Offset",
              "value": "0"
            },
            {
              "name": "X-Goog-Upload-Command",
              "value": "upload, finalize"
            }
          ]
        },
        "inputDataFieldName": "data"
      },
      "typeVersion": 4.1
    },
    {
      "id": "c24fb0b7-d21f-4fe7-bed4-b0e2ecd0c2b2",
      "name": "Démarrer la Session de Téléchargement pour Gemini",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1700,
        -500
      ],
      "parameters": {
        "url": "=https://generativelanguage.googleapis.com/upload/v1beta/files",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "jsonBody": "={\n  \"file\": {\n    \"display_name\": \"{{ $json.displayName }}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Goog-Upload-Protocol",
              "value": "resumable"
            },
            {
              "name": "X-Goog-Upload-Command",
              "value": "start"
            },
            {
              "name": "X-Goog-Upload-Header-Content-Length",
              "value": "={{  $json.fileSizeInBytes }}"
            },
            {
              "name": "X-Goog-Upload-Header-Content-Type",
              "value": "={{ $json.mimeType }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "wDRHYE3a1YNvuZ5Z",
          "name": "Gemini API Query Auth"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "e92b0b3d-e309-44b3-a288-2fea8f50c695",
      "name": "URL Loom Valide ?",
      "type": "n8n-nodes-base.if",
      "position": [
        380,
        -420
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "debf942c-92e7-43f0-9c9b-15d03aa6e507",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              },
              "leftValue": "={{ $json['Loom Video URL'] }}",
              "rightValue": "https://www.loom.com/share/"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3180c3a0-b5cc-4501-80ed-2ebce9463af2",
      "name": "Fusionner",
      "type": "n8n-nodes-base.merge",
      "position": [
        2140,
        -425
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "5c1a814e-041b-456d-89f2-22a1845d6693",
      "name": "Fusionner1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1480,
        -420
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "51021cc5-971d-4287-be7f-d102ccb2505f",
      "name": "Extraire les Détails du Fichier",
      "type": "n8n-nodes-base.set",
      "position": [
        2580,
        -420
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "geminiFileUri",
              "value": "={{ $json.file.uri }}"
            },
            {
              "name": "geminiFileName",
              "value": "={{ $json.file.name }}"
            },
            {
              "name": "geminiFileMimeType",
              "value": "={{ $json.file.mimeType }}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "a0b210dc-4d66-45eb-a1f6-526297049bea",
      "name": "Attendre 5 Secondes",
      "type": "n8n-nodes-base.wait",
      "position": [
        3060,
        -400
      ],
      "webhookId": "ccaddc3f-1091-4e08-a513-0f61bbfe025f",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e36643d5-5102-4ef9-99ce-3777d38d0f16",
      "name": "Boucler Jusqu'à Activation Vidéo",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2800,
        -425
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "6496a5f2-b52a-4f68-bfef-09788e36aac1",
      "name": "Obtenir le Statut de la Vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3240,
        -400
      ],
      "parameters": {
        "url": "={{ $json.geminiFileUri }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "wDRHYE3a1YNvuZ5Z",
          "name": "Gemini API Query Auth"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4a822835-719f-46aa-8f0e-1715af385f7a",
      "name": "Vidéo Active ?",
      "type": "n8n-nodes-base.if",
      "position": [
        3460,
        -400
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0f9c3f19-3a7b-43c3-9e81-41cfcf649d00",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.state }}",
              "rightValue": "ACTIVE"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9e78e6d5-435c-4c8a-8cd4-64f0c5e4ff7f",
      "name": "Demander à Gemini de Résumer la Vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3740,
        -460
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro-preview-03-25:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"contents\": [\n    {\n      \"parts\": [\n        {\n          \"file_data\": {\n            \"mime_type\": \"video/mp4\",\n            \"file_uri\": \"{{ $json.uri }}\"\n          }\n        },\n        {\n          \"text\": {{ JSON.stringify($('Loom URL Form').first().json['Enter a question about the video']) }}\n        }\n      ]\n    }\n  ]\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "wDRHYE3a1YNvuZ5Z",
          "name": "Gemini API Query Auth"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "77df9ffb-2a4d-46c9-a2a1-44eaf1f7a734",
      "name": "Note Adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -640
      ],
      "parameters": {
        "color": 7,
        "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."
      },
      "typeVersion": 1
    },
    {
      "id": "89545746-96c1-4896-95bf-c5bca17b1ef3",
      "name": "Note Adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -640
      ],
      "parameters": {
        "color": 5,
        "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."
      },
      "typeVersion": 1
    },
    {
      "id": "f35ceb48-2931-47b5-835a-bf3cfbec813b",
      "name": "Extraire l'URL pour le Téléchargement",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        -500
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "uploadUrl",
              "value": "={{ $json.headers['x-goog-upload-url'] }}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "02cff2c4-5f4f-4422-acc8-bb5e6a125365",
      "name": "Note Adhésive2",
      "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."
      },
      "typeVersion": 1
    },
    {
      "id": "9f457708-2b80-403e-8030-1dbdbc81bc54",
      "name": "Note Adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3620,
        -640
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 420,
        "content": "## Send Request to Gemini LLM\n\nOnce video is active, send video to Gemini with prompt from the form"
      },
      "typeVersion": 1
    },
    {
      "id": "33800aac-7646-40ce-98b2-213f48f91ad8",
      "name": "Calculer la Taille du Fichier",
      "type": "n8n-nodes-base.code",
      "position": [
        1240,
        -520
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Get the input item (using $input.item for single item processing is fine)\nconst item = $input.item;\n\n// --- Define the Expected Binary Property Name ---\n// This is crucial. If the node feeding this Code node outputs binary data\n// under a different property name (e.g., 'file', 'binaryOutput'),\n// you MUST change this value accordingly.\nconst binaryPropertyName = 'data';\n\n// --- Check if any binary data exists and if the specific property is present ---\nif (!item.binary || !item.binary[binaryPropertyName]) {\n  const availableProperties = item.binary ? Object.keys(item.binary).join(', ') : 'none';\n  throw new Error(`Binary property '${binaryPropertyName}' not found on input item. Available binary properties: ${availableProperties}. Check the 'Property Name' setting in the preceding node if it handles binary data (e.g., HTTP Request, Read File).`);\n}\n\n// --- Access Binary Data and Calculate Size using Helpers ---\n// Use the n8n helper function to get the buffer\nconst buffer = await this.helpers.getBinaryDataBuffer(0, binaryPropertyName);\n\n// The length of the buffer *is* the size in bytes\nconst fileSizeInBytes = buffer.length;\n\n// --- Prepare Output JSON ---\nconst outputJson = {\n  fileSizeInBytes: fileSizeInBytes,\n};\n\nreturn outputJson;"
      },
      "typeVersion": 2
    },
    {
      "id": "e6fdc875-2fde-4da3-8330-11e72ba02d33",
      "name": "Définir les Attributs Vidéo",
      "type": "n8n-nodes-base.set",
      "position": [
        1240,
        -360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "185823b8-48f0-423b-a670-33a5215cf348",
              "name": "mimeType",
              "type": "string",
              "value": "={{ $binary.data.mimeType }}"
            },
            {
              "id": "94cce1af-7bcc-49ea-9968-c0b12c2fbc82",
              "name": "displayName",
              "type": "string",
              "value": "=loom_{{ $('Extract Video ID').item.json.videoId }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "3ae06fca-7edb-4949-a9e7-588256ffddd0",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        4020,
        -460
      ],
      "webhookId": "3ec96773-ccb6-446d-8b2f-0d53e50bfca8",
      "parameters": {
        "text": "=Loom video response from Gemini: {{ $json.candidates[0].content.parts[0].text }}",
        "user": {
          "__rl": true,
          "mode": "username",
          "value": "@giosegar"
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "9",
          "name": "Bot access token"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "b564cf3b-1fd7-4b4d-9fda-1e5ba2842224",
      "name": "Note Adhésive4",
      "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 output to Slack. \n\nTo use it, you just need to add your own [API key for Gemini](https://aistudio.google.com/app/apikey) and Slack connection. \n\nClick the link above to get your Gemini API key, then add a generic \"Query auth\" type credential in n8n. The name will be \"key\" and the value will be your API key.\n\nOne way to customize this workflow would be to make the trigger any received email, extract the Loom link, and run an auto-prompt like \"Describe this video in detail\". "
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "3180c3a0-b5cc-4501-80ed-2ebce9463af2": {
      "main": [
        [
          {
            "node": "a7331691-acda-4191-add6-65ab1f61b1d5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5c1a814e-041b-456d-89f2-22a1845d6693": {
      "main": [
        [
          {
            "node": "c24fb0b7-d21f-4fe7-bed4-b0e2ecd0c2b2",
            "type": "main",
            "index": 0
          },
          {
            "node": "3180c3a0-b5cc-4501-80ed-2ebce9463af2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "9426bf71-eb18-419f-a693-a7b5832956a6": {
      "main": [
        [
          {
            "node": "e92b0b3d-e309-44b3-a288-2fea8f50c695",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a822835-719f-46aa-8f0e-1715af385f7a": {
      "main": [
        [
          {
            "node": "e36643d5-5102-4ef9-99ce-3777d38d0f16",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "a0b210dc-4d66-45eb-a1f6-526297049bea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a0b210dc-4d66-45eb-a1f6-526297049bea": {
      "main": [
        [
          {
            "node": "6496a5f2-b52a-4f68-bfef-09788e36aac1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e92b0b3d-e309-44b3-a288-2fea8f50c695": {
      "main": [
        [
          {
            "node": "1b69f192-6e52-4484-8953-285441906bde",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1b69f192-6e52-4484-8953-285441906bde": {
      "main": [
        [
          {
            "node": "96a1f9d1-41da-4f73-aef1-5fc61a2ecbde",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6496a5f2-b52a-4f68-bfef-09788e36aac1": {
      "main": [
        [
          {
            "node": "4a822835-719f-46aa-8f0e-1715af385f7a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a7331691-acda-4191-add6-65ab1f61b1d5": {
      "main": [
        [
          {
            "node": "51021cc5-971d-4287-be7f-d102ccb2505f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "96a1f9d1-41da-4f73-aef1-5fc61a2ecbde": {
      "main": [
        [
          {
            "node": "983e0686-6a65-495c-af5c-103001995271",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "33800aac-7646-40ce-98b2-213f48f91ad8": {
      "main": [
        [
          {
            "node": "5c1a814e-041b-456d-89f2-22a1845d6693",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "51021cc5-971d-4287-be7f-d102ccb2505f": {
      "main": [
        [
          {
            "node": "e36643d5-5102-4ef9-99ce-3777d38d0f16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e6fdc875-2fde-4da3-8330-11e72ba02d33": {
      "main": [
        [
          {
            "node": "5c1a814e-041b-456d-89f2-22a1845d6693",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "983e0686-6a65-495c-af5c-103001995271": {
      "main": [
        [
          {
            "node": "33800aac-7646-40ce-98b2-213f48f91ad8",
            "type": "main",
            "index": 0
          },
          {
            "node": "e6fdc875-2fde-4da3-8330-11e72ba02d33",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f35ceb48-2931-47b5-835a-bf3cfbec813b": {
      "main": [
        [
          {
            "node": "3180c3a0-b5cc-4501-80ed-2ebce9463af2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e36643d5-5102-4ef9-99ce-3777d38d0f16": {
      "main": [
        [
          {
            "node": "9e78e6d5-435c-4c8a-8cd4-64f0c5e4ff7f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "a0b210dc-4d66-45eb-a1f6-526297049bea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9e78e6d5-435c-4c8a-8cd4-64f0c5e4ff7f": {
      "main": [
        [
          {
            "node": "3ae06fca-7edb-4949-a9e7-588256ffddd0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c24fb0b7-d21f-4fe7-bed4-b0e2ecd0c2b2": {
      "main": [
        [
          {
            "node": "f35ceb48-2931-47b5-835a-bf3cfbec813b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Intelligence Artificielle, Opérations IT

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds24
Catégorie2
Types de nœuds10
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
GiovanniSegar

GiovanniSegar

@giosegar

I build automations and web apps for businesses. If your business has over $1M in revenue, I'll help you scale with smart systems.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34