Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save shraey96/ad8fa167cf62e132e202622f203cb479 to your computer and use it in GitHub Desktop.

Select an option

Save shraey96/ad8fa167cf62e132e202622f203cb479 to your computer and use it in GitHub Desktop.
22. Automated Video Analysis: AI-Powered Insight Generation from Google Drive - Automated Video Analysis: AI-Powered Insight Generation from Google Drive Subtitle: From Google Driv
{
"id": "cU2bV1pvBJ1CGIkT",
"meta": {
"instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480"
},
"name": "22. Automated Video Analysis: AI-Powered Insight Generation from Google Drive",
"tags": [],
"nodes": [
{
"id": "a2f6a6d0-a703-4d51-877f-34eba4f8a3a1",
"name": "Download Video from Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-48,
192
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "list",
"value": ""
},
"options": {},
"operation": "download",
"authentication": "oAuth2"
},
"typeVersion": 1
},
{
"id": "c4ce7aef-dca6-46ba-8034-08deda58f2b1",
"name": "Check File Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
512,
192
],
"parameters": {
"url": "https://generativelanguage.googleapis.com/v1beta/files/your_file_id",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 1
},
{
"id": "c4950c17-ce9f-4d1e-a5bf-bc65507cf649",
"name": "Analyze Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
752,
192
],
"parameters": {
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent",
"options": {},
"requestMethod": "POST",
"jsonParameters": true,
"bodyParametersJson": "{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"fileData\": {\n \"fileUri\": \"files/your_file_id\"\n }\n },\n {\n \"text\": \"Please analyze the video and provide a summary.\"\n }\n ]\n }\n ]\n}"
},
"typeVersion": 1
},
{
"id": "966c7176-7f6f-4e73-bebd-2f4ddc80ade7",
"name": "Format Analysis Result",
"type": "n8n-nodes-base.set",
"position": [
1024,
192
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "7d5b2048-0fe3-4b80-a0d7-dca01ee47707",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-304,
192
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "c72621d8-ce14-49f6-b869-6cee976b3d2c",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
176,
192
],
"parameters": {
"text": "Hi, could you please prepare the video below:\n",
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "cfa8b8de-9093-4525-82e1-fdfe3c0c6dca",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
160,
480
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "307b89d6-6841-4d7b-9a89-708008d5a421",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
-240
],
"parameters": {
"width": 260,
"height": 592,
"content": "## 🟒 Section 1: Trigger – Start the Workflow\n\nπŸ”— **Node:** `Schedule Trigger`\n\n* Runs the workflow automatically at a defined interval (e.g., daily).\n* Eliminates the need to manually start each run.\n\nπŸ’‘ **Why useful?**\nKeeps analysis consistent without human intervention.\n\n---"
},
"typeVersion": 1
},
{
"id": "45dfc6d2-aca5-432d-ba70-216dd3dae6b6",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-256
],
"parameters": {
"color": 6,
"width": 212,
"height": 608,
"content": "\n## 🟦 Section 2: Download Video\n\nπŸ”— **Node:** `Download Video from Drive`\n\n* Connects to Google Drive.\n* Fetches the video file you want to analyze.\n\nπŸ’‘ **Why useful?**\nPulls the raw video directly from storage β†’ no manual download needed.\n\n---"
},
"typeVersion": 1
},
{
"id": "e5470b1a-c9c7-4a7b-9353-f09fb8e57db8",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-272
],
"parameters": {
"color": 5,
"width": 276,
"height": 624,
"content": "## 🟣 Section 3: Prepare for AI Analysis\n\nπŸ”— **Nodes:**\n\n* `Basic LLM Chain` β†’ Prepares a structured prompt for Gemini.\n* `Google Gemini Chat Model` β†’ Defines Gemini as the **AI engine** for analysis.\n\nπŸ’‘ **Why useful?**\nEnsures that Gemini gets both the **video file + clear instructions** on what to analyze (e.g., \"Please provide a summary\").\n\n---"
},
"typeVersion": 1
},
{
"id": "7f361dfb-4c6d-46e4-8892-3c342cb412bb",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
448,
-288
],
"parameters": {
"color": 2,
"width": 212,
"height": 640,
"content": "## 🟑 Section 4: Validate File Status\n\nπŸ”— **Node:** `Check File Status`\n\n* Confirms that the video file is uploaded and ready to be processed by Gemini’s API.\n\nπŸ’‘ **Why useful?**\nPrevents wasted runs by making sure the file exists and is accessible before analysis.\n\n---"
},
"typeVersion": 1
},
{
"id": "cba8825c-b6f9-4a6c-a3d5-a1b36197de29",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
-464
],
"parameters": {
"color": 3,
"width": 228,
"height": 816,
"content": "## πŸ”΅ Section 5: AI Video Analysis\n\nπŸ”— **Node:** `Analyze Video`\n\n* Sends the video file to Gemini (via API request).\n* Asks Gemini to **analyze and summarize** the video.\n\nπŸ’‘ **Why useful?**\nExtracts insights from video content automatically β€” no need to watch manually.\n\nπŸ“© **Example Output:**\n\n> \"The video shows a product demo highlighting three features: speed, security, and collaboration. The speaker explains how the software reduces manual tasks. Ending includes a call to action for early sign-up.\"\n\n---"
},
"typeVersion": 1
},
{
"id": "368b2f7e-eb48-4c91-ab05-3537446448f4",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-272
],
"parameters": {
"color": 7,
"width": 228,
"height": 624,
"content": "## 🟠 Section 6: Format Results\n\nπŸ”— **Node:** `Format Analysis Result`\n\n* Structures the Gemini response into clean output.\n* Makes it easy to forward results into email, Slack, or reporting tools.\n\nπŸ’‘ **Why useful?**\nInstead of messy raw JSON, you get **clear summaries** ready to share.\n\n---"
},
"typeVersion": 1
},
{
"id": "4250c138-b711-4cea-b71c-95e1b01c0452",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2096,
-368
],
"parameters": {
"color": 4,
"width": 1300,
"height": 320,
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
},
"typeVersion": 1
},
{
"id": "17b1b31d-b061-490e-96a6-188fadb15eaf",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2096,
-32
],
"parameters": {
"color": 4,
"width": 1289,
"height": 2958,
"content": "# Automated Video Analysis: AI-Powered Insight Generation from Google Drive\n\n**Subtitle:** From Google Drive Upload β†’ Gemini AI β†’ Video Insights\n\n---\n\n### 🌍 Overview\n\nThis workflow automates the **analysis of videos stored in Google Drive**.\nIt downloads a video, validates it, sends it to **Google Gemini AI** for analysis, and returns a **structured summary** of the content.\n\nThink of it as your **AI-powered video analyst** that works on schedule.\n\n---\n\n## 🟒 Section 1: Trigger – Start the Workflow\n\nπŸ”— **Node:** `Schedule Trigger`\n\n* Runs the workflow automatically at a defined interval (e.g., daily).\n* Eliminates the need to manually start each run.\n\nπŸ’‘ **Why useful?**\nKeeps analysis consistent without human intervention.\n\n---\n\n## 🟦 Section 2: Download Video\n\nπŸ”— **Node:** `Download Video from Drive`\n\n* Connects to Google Drive.\n* Fetches the video file you want to analyze.\n\nπŸ’‘ **Why useful?**\nPulls the raw video directly from storage β†’ no manual download needed.\n\n---\n\n## 🟣 Section 3: Prepare for AI Analysis\n\nπŸ”— **Nodes:**\n\n* `Basic LLM Chain` β†’ Prepares a structured prompt for Gemini.\n* `Google Gemini Chat Model` β†’ Defines Gemini as the **AI engine** for analysis.\n\nπŸ’‘ **Why useful?**\nEnsures that Gemini gets both the **video file + clear instructions** on what to analyze (e.g., \"Please provide a summary\").\n\n---\n\n## 🟑 Section 4: Validate File Status\n\nπŸ”— **Node:** `Check File Status`\n\n* Confirms that the video file is uploaded and ready to be processed by Gemini’s API.\n\nπŸ’‘ **Why useful?**\nPrevents wasted runs by making sure the file exists and is accessible before analysis.\n\n---\n\n## πŸ”΅ Section 5: AI Video Analysis\n\nπŸ”— **Node:** `Analyze Video`\n\n* Sends the video file to Gemini (via API request).\n* Asks Gemini to **analyze and summarize** the video.\n\nπŸ’‘ **Why useful?**\nExtracts insights from video content automatically β€” no need to watch manually.\n\nπŸ“© **Example Output:**\n\n> \"The video shows a product demo highlighting three features: speed, security, and collaboration. The speaker explains how the software reduces manual tasks. Ending includes a call to action for early sign-up.\"\n\n---\n\n## 🟠 Section 6: Format Results\n\nπŸ”— **Node:** `Format Analysis Result`\n\n* Structures the Gemini response into clean output.\n* Makes it easy to forward results into email, Slack, or reporting tools.\n\nπŸ’‘ **Why useful?**\nInstead of messy raw JSON, you get **clear summaries** ready to share.\n\n---\n\n## πŸ“Š Workflow Summary\n\n| Section | Node(s) | Purpose | Benefit |\n| ----------------- | ---------------------------------- | ---------------------------------- | ---------------------------- |\n| 🟒 Trigger | Schedule Trigger | Run workflow on schedule | Fully automated start |\n| 🟦 Download Video | Google Drive | Fetch video from Drive | Removes manual steps |\n| 🟣 Prepare Prompt | Basic LLM Chain, Gemini Chat Model | Structure prompt for AI | Accurate AI analysis |\n| 🟑 Validate File | Check File Status | Ensure file is accessible | Avoids failed runs |\n| πŸ”΅ AI Analysis | Analyze Video | Gemini analyzes + summarizes video | Saves hours of manual review |\n| 🟠 Format Output | Format Analysis Result | Clean up AI output | Ready-to-use summaries |\n| πŸ”΄ Assistance | Sticky Notes | Training + support info | Beginner-friendly handoff |\n\n---\n\n## πŸš€ Benefits\n\n* **Hands-free analysis** β†’ Videos summarized automatically.\n* **Saves time** β†’ No need to watch entire footage.\n* **Reliable** β†’ Validates file before sending to AI.\n* **Flexible** β†’ Schedule runs (daily, weekly, etc.).\n* **Scalable** β†’ Works for 1 video or 1,000.\n* **Beginner-friendly** β†’ Includes sticky notes and author support.\n\n---"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "de0a9b74-a321-410d-984c-2360832599af",
"connections": {
"Analyze Video": {
"main": [
[
{
"node": "Format Analysis Result",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Check File Status",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Download Video from Drive",
"type": "main",
"index": 0
}
]
]
},
"Check File Status": {
"main": [
[
{
"node": "Analyze Video",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Download Video from Drive": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment