Skip to content

Instantly share code, notes, and snippets.

@architjn
Created June 9, 2025 13:58
Show Gist options
  • Save architjn/91a3ef94221b12c801daf6d60b44d505 to your computer and use it in GitHub Desktop.
Save architjn/91a3ef94221b12c801daf6d60b44d505 to your computer and use it in GitHub Desktop.
{
"name": "Video Scraping",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-160,
-40
],
"id": "6afedb3a-35d6-4e0c-8e24-6f4a85da513f",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"content": "## Gemini Video To Text\n- API Key - [Generate](https://aistudio.google.com/apikey)\n- Gemini API URL - https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent\n- Request JSON body - https://gist.github.com/architjn/b2f9c057a70bc50e3daaf04445634c43\n- Rate limiting - https://ai.google.dev/gemini-api/docs/rate-limits",
"height": 580,
"width": 1080,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
-260
],
"typeVersion": 1,
"id": "75eaa3ee-352b-4a17-a057-2816db5e64f2",
"name": "Sticky Note"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "94a0c925-d640-46bb-855c-07f9201ca523",
"name": "videoLink",
"value": "https://video.fosm8-1.fna.fbcdn.net/v/t42.1790-2/501035549_4063558657233372_3386147970595565113_n.?_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=UttfhuuvORAQ7kNvwGiuAYx&_nc_oc=Adlsq7InlmtynWp4Tag3uTYNBzt1ibzJYNii-uyW3uvfIWwnMULC6MN5Q36VNvWsqso&_nc_zt=28&_nc_ht=video.fosm8-1.fna&_nc_gid=nJCecAhjHtZ4cOs_dixYog&oh=00_AfPCB2C6VLPj-RUX6Qrv7hBB4RcO3QdXZKFUuIUsJya47Q&oe=6847E550",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
0,
-40
],
"id": "8e61fd4d-07e6-469a-ba87-9d9dc9e799ce",
"name": "Set Video Link"
},
{
"parameters": {
"url": "={{ $json.videoLink }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
140,
-40
],
"id": "52028ad8-744b-428c-b83c-478919f97a37",
"name": "HTTP Request"
},
{
"parameters": {
"operation": "binaryToPropery",
"destinationKey": "base64",
"options": {}
},
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
280,
-40
],
"id": "04c23b2c-c404-46d6-b869-5d84f6b637bd",
"name": "Extract from File"
},
{
"parameters": {
"method": "POST",
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"contents\": [{\n \"parts\":[\n {\n \"inline_data\": {\n \"mime_type\":\"video/mp4\",\n \"data\": \"{{ $json.base64 }}\"\n }\n },\n {\"text\": \"Describe this video, include what you see, and the transcription of what's been said\"}\n ]\n }]\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
-40
],
"id": "1ee3a178-74fb-47e7-9c79-9f9fa47a0a5a",
"name": "Gemini AI Model",
"credentials": {
"httpQueryAuth": {
"id": "n77TzV94us6JY4Hu",
"name": "Gemini Demo"
}
}
}
],
"pinData": {},
"connections": {
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Set Video Link",
"type": "main",
"index": 0
}
]
]
},
"Set Video Link": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Gemini AI Model",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "e41e8fc9-1495-4c89-ab44-6b82b923a423",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9"
},
"id": "78phblQWTy62K6hE",
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment