{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b691c282-853a-4b97-af07-c410654538ad",
      "name": "Get_Scraper_Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        560
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/streamers~youtube-scraper/runs/last?token={{ $('Parameters').item.json.Apify_API }}",
        "method": "=GET",
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "bb9ce463-e613-4aeb-a01e-5b865b475281",
      "name": "Start_YouTube_Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -128,
        640
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/streamers~youtube-scraper/runs?token={{ $('Parameters').item.json.Apify_API }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"downloadSubtitles\": true,\n    \"hasCC\": false,\n    \"hasLocation\": false,\n    \"hasSubtitles\": false,\n    \"is360\": false,\n    \"is3D\": false,\n    \"is4K\": false,\n    \"isBought\": false,\n    \"isHD\": false,\n    \"isHDR\": false,\n    \"isLive\": false,\n    \"isVR180\": false,\n    \"maxResultStreams\": 0,\n    \"maxResults\": {{ $('Parameters').item.json.Total_number_video }},\n    \"maxResultsShorts\": 0,\n    \"preferAutoGeneratedSubtitles\": true,\n    \"saveSubsToKVS\": true,\n    \"startUrls\": [\n        {\n            \"url\": \"{{ $('Parameters').item.json.Youtuber_MainPage_URL }}\",\n            \"method\": \"GET\"\n        }\n    ]\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "ecdf2cac-ffca-4fcd-b840-1cd7d0fd9c8f",
      "name": "Check_Scraper_Status",
      "type": "n8n-nodes-base.if",
      "position": [
        544,
        640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e0da6d3b-2eb2-44b3-8115-455361d77513",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "SUCCEEDED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b6c12e18-f115-4a76-a1bb-2ce1a0bbab4e",
      "name": "Retrieve_Scraped_Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        640
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/streamers~youtube-scraper/runs/last/dataset/items?token={{ $('Parameters').item.json.Apify_API }}&format=json&status=SUCCEEDED",
        "method": "=GET",
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "5940ced6-dc18-495a-9996-2a3a79f23089",
      "name": "Content_Analysis_Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        576,
        1344
      ],
      "parameters": {
        "text": "=id:{{ $('Process_Each_Video').item.json.VideoID }}\ntitle:{{ $('Process_Each_Video').item.json['\\uFEFFTitle'] }}\nsubtitle:{{ $('Select_Subtitle_Language').item.json.srt }}\ndescription:{{ $('Process_Each_Video').item.json.Description }}",
        "options": {
          "systemMessage": "=# Role: Video Content Summarization Specialist\n\n## Profile\n- language: English\n- description: Specializes in analyzing YouTube video transcripts and delivering accurate, structured content summaries across multiple domains.\n- background: Years of experience in content analysis; familiar with the needs of education, research, and professional training contexts.\n- personality: Meticulous, logical, and user-oriented.\n- expertise: Video content analysis, information extraction, structured summary writing.\n- target_audience: Content creators, researchers, educators, and industry professionals.\n\n## Skills\n\n1. Core Summarization Skills\n   - Content Analysis: Rapidly identify core themes and key information points in the video.\n   - Logical Organization: Present key points in a structured manner ordered by importance.\n   - Terminology Handling: Appropriately preserve essential technical terms and critical data.\n\n## Rules\n\n1. Summary Principles:\n   - Accuracy: Base strictly on the original transcript; do not add subjective speculation.\n   - Completeness: Cover all viewpoints and insights from the video; no word-count limit.\n   - Coherence: Segment and express according to the content\u2019s inherent logic.\n\n2. Constraints:\n   - Do not include any timestamps.\n   - Do not omit essential technical terms.\n   - Do not include irrelevant content.\n\n## Workflows\n\n- Objective: Provide high-quality video content summaries for the specified audience.\n- Step 1: Read the transcript thoroughly and identify core themes and key viewpoints.\n- Step 2: Organize the key points in a logical sequence to ensure coherence.\n- Step 3: If no video transcript exists, output only `null` with no additional explanation.\n- Step 4: You must output using the following format:\n{\n  \"VideoID\": \"the video's unique id\",\n  \"Field\": \"the domain/category the video belongs to\",\n  \"Output\": \"the analysis result\"\n}\n\n## Initialization\nAs a Video Content Summarization Specialist, you must adhere to the Rules above and execute the task according to the Workflows.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 2.1
    },
    {
      "id": "75b5d321-80c6-4e7c-8290-34d99aea61f6",
      "name": "Output_Parser_Auto_Fix",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        640,
        1536
      ],
      "parameters": {
        "options": {
          "prompt": "Instructions:\n--------------\n{instructions}\n--------------\nCompletion:\n--------------\n{completion}\n--------------\n\nAbove, the Completion did not satisfy the constraints given in the Instructions.\nError:\n--------------\n{error}\n--------------\n\nPlease try again. Please only respond with an answer that satisfies the constraints laid out in the Instructions:"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2428bea8-507e-4c35-9f74-d0830f380398",
      "name": "Structured_Output_Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        736,
        1664
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"VideoID\": \"the video's unique id\",\n  \"Field\": \"the domain/category the video belongs to\",\n  \"Output\": \"the analysis result\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "7958ee72-77b0-434e-800e-d20303e99ba0",
      "name": "Data_Processing_Script",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        1408
      ],
      "parameters": {
        "jsCode": "const results = [];\n\nfor (const item of items) {\n  const data = item.json.output; // \u53d6\u51fa\u5185\u90e8\u7684 output \u5bf9\u8c61\n\n  results.push({\n    json: {\n      VideoID: data.VideoID,\n      Field: data.Field,\n      Summary: data.Output\n    }\n  });\n}\n\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c42a9ec1-919c-4de9-9550-c58b922c585c",
      "name": "Wait_15_Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        96,
        640
      ],
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "b2a81c4d-b6d1-43d1-b19b-6c5935a4b872",
      "name": "Convert_To_File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        992,
        640
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "d4f8de19-8c86-43e7-bb69-414c560533dd",
      "name": "Upload_To_Google_Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1184,
        736
      ],
      "parameters": {
        "name": "={{ $('Parameters').item.json.Storing_Name }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 3
    },
    {
      "id": "94dc0d4d-4d38-4229-b857-40189710e9b0",
      "name": "Extract_From_File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -448,
        1552
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "28641279-d6e3-4836-9b33-780ea0138ad7",
      "name": "Download_From_Google_Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -672,
        1552
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Upload_To_Google_Drive').item.json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 3
    },
    {
      "id": "b58658ce-ef88-476e-a610-61be50e99daf",
      "name": "Process_Each_Video",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -32,
        1552
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "4d0ee473-3d4d-41a3-ac43-5215e5f7315d",
      "name": "Select_Subtitle_Language",
      "type": "n8n-nodes-base.code",
      "position": [
        208,
        1424
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst isEnglish = (val) => {\n  if (typeof val !== 'string') return false;\n  const v = val.toLowerCase();\n  return v === 'en' || v === 'english' || v.startsWith('en-') || v.startsWith('en_');\n};\n\nconst out = items.map(({ json: src }) => {\n  let A = Number(src.A ?? 0);  // select the A-th English track (0 = first)\n  let i = 0, res = null;\n\n  while (true) {\n    const lang = src[`subtitles.${i}.language`];\n    if (lang === undefined) break;\n\n    if (isEnglish(lang)) {\n      if (A === 0) {\n        res = {\n          index: i,\n          language: lang,\n          srt: src[`subtitles.${i}.srt`],\n          srtUrl: src[`subtitles.${i}.srtUrl`],\n        };\n        break;\n      }\n      A--;\n    }\n    i++;\n  }\n\n  return { json: res ?? { index: null, language: null, srt: null, srtUrl: null } };\n});\n\nreturn out;"
      },
      "typeVersion": 2
    },
    {
      "id": "66c57b93-9c38-458d-9ad0-8ffc1cb1f762",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        32
      ],
      "parameters": {
        "color": 6,
        "width": 496,
        "height": 864,
        "content": "## 1) Input & Initialization\n**Purpose:** Collect all required inputs and prepare an output destination.\n\n**Covers nodes:** `Parameters (Form Trigger)`, `Create sheet`  \n**What it does:**  \n- Presents a web form for the target channel and run options.  \n- Creates/ensures a Google Sheet **tab** named after your `Storing_Name`.\n\n**Form fields :**\n- **Youtuber_MainPage_URL** \u2014 Target channel to crawl.  \n  _Example:_ `https://www.youtube.com/@n8n-io`  \n- **Total_number_video** \u2014 How many videos to fetch.  \n  _Recommended:_ Enter the channel\u2019s **current total video count** to crawl everything.  \n- **Storing_Name** \u2014 Used as the Google Sheet **tab name** and Drive **file name**.  \n  _Example:_ `n8n.io`  \n- **Apify_API** \u2014 Your Apify API token for the YouTube Scraper.  \n- **Email** \u2014 Where to send a completion notice.\n\n**Outputs produced:**  \n- A fresh Sheet tab (named `Storing_Name`) for writing rows later.  \n- A validated parameter set that drives the rest of the run.\n\n**Tips:**  \n- Keep `Storing_Name` short and readable.  \n- For first run, try a small number (10\u201320) to validate end-to-end."
      },
      "typeVersion": 1
    },
    {
      "id": "b37d3864-79e8-47f9-8520-a44f75f19946",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        592
      ],
      "parameters": {
        "width": 816,
        "height": 688,
        "content": "# \ud83d\ude80 YouTuber Crawler \u2014 Quick Start Guide\n\n## \ud83d\udccb Workflow Overview\nThis automated workflow helps you:\n- \ud83c\udfaf Crawl all videos from a specified YouTuber channel\n- \ud83e\udd16 Use AI to analyze video content and generate summaries\n- \ud83d\udcca Save structured data to Google Sheets\n- \ud83d\udcc1 Back up raw data to Google Drive\n- \ud83d\udcf1 Send processing status notifications via Gmail\n\n## \ud83d\udd04 How it works\n1) Submit the form\n2) The workflow crawls the channel and waits for the run to finish\n3) Raw JSON is backed up to Google Drive\n4) Data is extracted and processed in batches\n5) Subtitles are auto-selected (EN when available)\n6) AI generates structured summaries\n7) Results are appended to Google Sheets, and you get an email notice\n\n## \u2705Prerequisites\n- Create a **Google Sheets** for storage data\n- Configured credentials for **Google Sheets**, **Google Drive** and **Gmail**\n- Configured **DeepSeek API**\uff08Or any LLM model\uff09 credentials\n"
      },
      "typeVersion": 1
    },
    {
      "id": "25bff827-a101-4615-b001-babf3f205fe8",
      "name": "Parameters",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -576,
        720
      ],
      "parameters": {
        "options": {},
        "formTitle": "={{ $workflow.name }}",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Youtuber_MainPage_URL",
              "placeholder": "This parameters determines which YouTuber\u2019s channel will be scraped.\nexample: https://www.youtube.com/@n8n-io",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Total_number_video",
              "placeholder": "This parameters determines how much video will be scraped. \n(Recommended: fill in the total number of videos currently on the YouTuber\u2019s channel.)",
              "requiredField": true
            },
            {
              "fieldLabel": "Storing_Name",
              "placeholder": "This parameter determines the name used for storing the file/data.\nexample: n8n.io"
            },
            {
              "fieldLabel": "Apify_API",
              "placeholder": "Fill in your Apify API key.",
              "requiredField": true
            },
            {
              "fieldLabel": "Email",
              "placeholder": "This parameter specifies the email address to receive notifications when the workflow is completed."
            }
          ]
        },
        "formDescription": "=Please complete all the parameters listed below."
      },
      "typeVersion": 2.3
    },
    {
      "id": "c128f91e-9eff-4d16-8478-09564392afe9",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        208,
        1856
      ],
      "parameters": {
        "sendTo": "={{ $('Parameters').item.json.Email }}",
        "message": "= {{ $workflow.name }} finished at \ud83d\udd53{{ new Date().toLocaleString(\"en-CA\", { hour12: false }).replace(',', '') }}\n",
        "options": {
          "appendAttribution": true
        },
        "subject": "=\ud83c\udf89 {{ $workflow.name }} Done~"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "retryOnFail": true,
      "typeVersion": 2.1
    },
    {
      "id": "746238f0-288f-4be9-9378-1499a825045a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        32
      ],
      "parameters": {
        "color": 2,
        "width": 1120,
        "height": 864,
        "content": "## 2) Channel Crawl & Status Loop\n**Purpose:** Start the YouTube crawl and wait for it to finish successfully.\n\n**Covers nodes:** `Start_YouTube_Scraper` \u2192 `Wait_15_Seconds` \u2192 `Get_Scraper_Status` \u2192 `Check_Scraper_Status` \u2192 `Retrieve_Scraped_Data`  \n**What it does:**  \n- Starts the Apify actor against the provided channel URL.  \n- Polls for completion at a fixed interval.  \n- On success, fetches the final dataset as JSON.\n\n**Inputs consumed:** `Youtuber_MainPage_URL`, `Total_number_video`, `Apify_API`  \n**Output produced:** Raw crawl JSON (video list, metadata, subtitles metadata, etc.)"
      },
      "typeVersion": 1
    },
    {
      "id": "decd4294-a551-4283-a260-b2b0b3db1e8d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        32
      ],
      "parameters": {
        "color": 6,
        "width": 432,
        "height": 864,
        "content": "## 3A) Raw Backup to Google Drive\n**Purpose:** Persist the original crawl dataset as a file in Drive so you have a durable, auditable snapshot of exactly what the scraper returned.\n\n**Covers nodes:** `Convert_To_File` \u2192 `Upload_To_Google_Drive`\n\n**What it does:**  \n- Converts the JSON dataset into a file artifact.  \n- Uploads that file to your chosen Google Drive folder (named with your `Storing_Name`).\n\n**Inputs consumed:** Crawled JSON from the scraper run.  \n**Outputs produced:** A raw backup file in Drive (for archival and reprocessing)."
      },
      "typeVersion": 1
    },
    {
      "id": "a61ec128-8f33-4277-84d1-8822d87152f6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        928
      ],
      "parameters": {
        "color": 3,
        "width": 496,
        "height": 896,
        "content": "## 5) Batch Processing & English Subtitle Selection\n**Purpose:** Process videos in manageable chunks and automatically pick usable subtitles.\n\n**Covers nodes:** `Process_Each_Video`, `Select_Subtitle_Language`  \n**What it does:**  \n- Splits the stream into batches.  \n- Finds the first **English**(`en`) subtitle track when available (SRT text and URL).\n\n\n**Notes:**  \n- If a video has no usable english subtitles, the AI summary may be limited.  \n- don't change the batch size."
      },
      "typeVersion": 1
    },
    {
      "id": "b2c5aaed-db92-4384-ad8d-8eaef5a17113",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        928
      ],
      "parameters": {
        "color": 4,
        "width": 704,
        "height": 896,
        "content": "## 6) AI Summarization Pipeline (Structured)\n**Purpose:** Generate professional, structured summaries with robust formatting guarantees.\n\n**Covers nodes (pipeline):**  \n- **LLM & Agent:** `DeepSeek_Chat_Model`, `Content_Analysis_Agent`  \n- **Structure & Auto-fix:** `Structured_Output_Parser`, `Output_Parser_Auto_Fix`  \n- **Cleanup:** `Data_Processing_Script`  \n\n**What it does:**  \n- Sends transcript + metadata into Aiagent.  \n- Forces a JSON output schema with `videoid`, `field` (topic/domain), and `output` (summary).  \n- Automatically retries/repairs formatting edge cases.  \n\n**Outputs produced:**  \n- Validated, structured AI results aligned to the schema.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fc98de8f-63c6-46ae-9fac-8b1772f279ab",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        928
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 896,
        "content": "## 7)Sheet Write & Gentle Throttling\n**Purpose:** Append results and keep APIs happy.\n\n**Covers nodes:** `Extract_Alldata`, `Write_Contentdata_To_Sheet`, `Wait_2_Seconds`  \n**What it does:**  \n- Get all data and write them into the sheet.  \n- Adds a small delay between items to reduce throttling.\n\n**Output produced:**  \n- A complete table: **metadata + AI summary** for each video.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4f7fc3dd-8439-4e2d-b110-0cf889c01502",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        1728
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 272,
        "content": "## 9) Completion Notification (Email)\n**Purpose:** Let the user know when the whole job is done."
      },
      "typeVersion": 1
    },
    {
      "id": "3367d34e-7529-4fa6-959e-4eb6a038be32",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        928
      ],
      "parameters": {
        "color": 4,
        "width": 416,
        "height": 896,
        "content": "## 4) Reload & Structured Extraction\n**Purpose:** Bring the raw backup back into the workflow and expand it into itemized records for batch processing.\n\n**Covers nodes:** `Download_From_Google_Drive` \u2192 `Extract_From_File`\n\n**What it does:**  \n- Downloads the just-created Drive file.  \n- Extracts JSON rows into individual items that flow into batching, subtitle selection, and AI steps.\n\n**Inputs consumed:** The Drive backup file created in **part3**.  \n**Outputs produced:** A stream of structured items (one per video) ready for batching and enrichment."
      },
      "typeVersion": 1
    },
    {
      "id": "d1dced07-8e95-4174-a2f5-9c00fb3b4789",
      "name": "start from?",
      "type": "n8n-nodes-base.code",
      "disabled": true,
      "position": [
        -256,
        1552
      ],
      "parameters": {
        "jsCode": "const START = 0;\n// ================================\nif (!Array.isArray(items)) return items;\n\nconst n = items.length;\nconst s = Number.isFinite(START) && START >= 0 ? START : 0;\n\nif (s >= n) return [];           \n\nreturn items.slice(s);          "
      },
      "typeVersion": 2
    },
    {
      "id": "90b79d9c-259c-4508-b1d1-a005dfb351da",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        1360
      ],
      "parameters": {
        "color": 3,
        "width": 816,
        "height": 416,
        "content": "## (Advanced) Resume from Drive CSV when workflow fails\n**Purpose:** When AI summarization errors out mid-run, bypass the crawler/backup path and continue processing from CSV in Google Drive\u2014only for the unfinished items.\n\n**How?:**  \n- Turn on `Start from?`\n- Temporarily wire `Parameters` \u2192 `Download_From_Google_Drive` and disconnect `Parameters` \u2192 `Create_Sheet` to skip the crawler branch.  \n- Paste the CSVfile **Google Drive file Id** (get it from `Upload_To_Google_Drive`) into `Download_From_Google_Drive`.  \n- Use `Start_Row` to process only the **unfinished** rows.\n\n**Partial-run tip:**  \n```js\nconst START = 0\n```\n- change \"0\" to skip those item had finished."
      },
      "typeVersion": 1
    },
    {
      "id": "e03152a8-1392-4d92-b067-4d261209289a",
      "name": "Wait_2_Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        1584,
        1616
      ],
      "parameters": {
        "amount": 2
      },
      "typeVersion": 1.1
    },
    {
      "id": "6561ca4a-68f5-4b05-aacf-c76484d663f8",
      "name": "Write_Contentdata_To_Sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1408,
        1424
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "VideoID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "VideoID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Duration",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Duration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Field",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Field",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "VideoID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "cellFormat": "RAW"
        },
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "={{ $('Parameters').item.json.Storing_Name }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1rvEoecYv3awJNLa41W7RwRb6YM1L8eZ6t65A0Q6wnIc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rvEoecYv3awJNLa41W7RwRb6YM1L8eZ6t65A0Q6wnIc/edit?usp=drivesdk",
          "cachedResultName": "youtuber scrape"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.7
    },
    {
      "id": "8116cbb0-9252-4b19-bb70-44209144512a",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        528,
        1664
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "deepSeekApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6493519d-22c2-4450-9b2c-1699e1861252",
      "name": "Extract_Alldata",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        1408
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3c8320dd-b38e-49ff-9b3c-ca88f469ccad",
              "name": "VideoID",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json.id }}"
            },
            {
              "id": "2b00dcfd-b55b-47e7-a11e-790389c90a8c",
              "name": "Title",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json['\\uFEFFtitle'] }}"
            },
            {
              "id": "2ffc02ec-ae5e-440c-8e5f-1b9083dc44b0",
              "name": "Duration",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json.duration }}"
            },
            {
              "id": "adc143bc-2934-4a39-a96d-e996e2b64fc2",
              "name": "Date",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json.date }}"
            },
            {
              "id": "fd284be2-851b-4da9-bb09-d368e89ff590",
              "name": "URL",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json.url }}"
            },
            {
              "id": "1ae57f58-5908-468c-803d-857dd72181be",
              "name": "Likes",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json.likes }}"
            },
            {
              "id": "e66dedb2-609c-4d2b-8c0a-e4a8451dddb2",
              "name": "Description",
              "type": "string",
              "value": "={{ $('Process_Each_Video').item.json.text }}"
            },
            {
              "id": "8405d779-9f1a-4b30-9a8f-3fccc6677f22",
              "name": "Field",
              "type": "string",
              "value": "={{ $('Data_Processing_Script').item.json.Field }}"
            },
            {
              "id": "a11425da-157d-4bd3-a02f-ea0ae44a7034",
              "name": "Summary",
              "type": "string",
              "value": "={{ $('Data_Processing_Script').item.json.Summary }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2508e77d-61d2-4d5d-bdc8-71544e9370a1",
      "name": "Create_Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -368,
        688
      ],
      "parameters": {
        "title": "={{ $('Parameters').item.json.Storing_Name }}",
        "options": {},
        "operation": "create",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1rvEoecYv3awJNLa41W7RwRb6YM1L8eZ6t65A0Q6wnIc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rvEoecYv3awJNLa41W7RwRb6YM1L8eZ6t65A0Q6wnIc/edit?usp=drivesdk",
          "cachedResultName": "youtuber scrape"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.7,
      "alwaysOutputData": true
    }
  ],
  "connections": {
    "Parameters": {
      "main": [
        [
          {
            "node": "Create_Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "start from?": {
      "main": [
        [
          {
            "node": "Process_Each_Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create_Sheet": {
      "main": [
        [
          {
            "node": "Start_YouTube_Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait_2_Seconds": {
      "main": [
        [
          {
            "node": "Process_Each_Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert_To_File": {
      "main": [
        [
          {
            "node": "Upload_To_Google_Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract_Alldata": {
      "main": [
        [
          {
            "node": "Write_Contentdata_To_Sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait_15_Seconds": {
      "main": [
        [
          {
            "node": "Get_Scraper_Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract_From_File": {
      "main": [
        [
          {
            "node": "start from?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get_Scraper_Status": {
      "main": [
        [
          {
            "node": "Check_Scraper_Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process_Each_Video": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Select_Subtitle_Language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Content_Analysis_Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Output_Parser_Auto_Fix",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check_Scraper_Status": {
      "main": [
        [
          {
            "node": "Retrieve_Scraped_Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait_15_Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve_Scraped_Data": {
      "main": [
        [
          {
            "node": "Convert_To_File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start_YouTube_Scraper": {
      "main": [
        [
          {
            "node": "Wait_15_Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content_Analysis_Agent": {
      "main": [
        [
          {
            "node": "Data_Processing_Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data_Processing_Script": {
      "main": [
        [
          {
            "node": "Extract_Alldata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output_Parser_Auto_Fix": {
      "ai_outputParser": [
        [
          {
            "node": "Content_Analysis_Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Upload_To_Google_Drive": {
      "main": [
        [
          {
            "node": "Download_From_Google_Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select_Subtitle_Language": {
      "main": [
        [
          {
            "node": "Content_Analysis_Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured_Output_Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Output_Parser_Auto_Fix",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Download_From_Google_Drive": {
      "main": [
        [
          {
            "node": "Extract_From_File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write_Contentdata_To_Sheet1": {
      "main": [
        [
          {
            "node": "Wait_2_Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}