{
  "name": "⭐ Course Creator From Course SRT Files ⭐",
  "nodes": [
    {
      "parameters": {
        "resource": "folder",
        "name": "={{ $json.constants.course_name }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $json.constants.folder_id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -8848,
        2416
      ],
      "id": "e7ae26b4-d4bf-44d3-a160-82a414464f11",
      "name": "Create folder",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "resource": "folder",
        "name": "={{ $('Global Constants').item.json.constants.course_name }}_Creatomate",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Create folder').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -8016,
        2224
      ],
      "id": "c0f58e2a-b3e3-432e-af70-05adcb4e6259",
      "name": "Create folder1",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "resource": "folder",
        "name": "={{ $('Global Constants').item.json.constants.course_name }}_ElevenLabs",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Create folder').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -8016,
        2368
      ],
      "id": "7b8184d8-46d7-4bac-b698-5f176675d82f",
      "name": "Create folder2",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "resource": "folder",
        "name": "={{ $('Global Constants').item.json.constants.course_name }}_Docs",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Create folder').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -8016,
        2496
      ],
      "id": "5713c3a2-a214-4c1c-a249-580676da2d94",
      "name": "Create folder3",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "operation": "copy",
        "fileId": {
          "__rl": true,
          "value": "=1uy-ytmIQ-szcA-QpRLH2XqI0USY6lHCPJYxzWQe0Uac",
          "mode": "id"
        },
        "name": "={{ $('Global Constants').item.json.constants.doc_name }}",
        "sameFolder": false,
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -8672,
        2416
      ],
      "id": "c7d8a3b3-81e9-465d-bf39-c28ce6356cbb",
      "name": "Copy file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "name"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.sort",
      "typeVersion": 1,
      "position": [
        -6512,
        2416
      ],
      "id": "f131dd81-e30a-4068-ac9a-5cbc9363a178",
      "name": "Sort"
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 198,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7312,
        2384
      ],
      "typeVersion": 1,
      "id": "d4036fa2-7839-4556-ae02-63517d9e5e8e",
      "name": "Sticky Note29"
    },
    {
      "parameters": {
        "content": "### Upload PDF Attachment",
        "height": 80,
        "width": 150,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7328,
        2352
      ],
      "typeVersion": 1,
      "id": "9ab46dff-3ef4-4d86-bfdd-47e2c2678525",
      "name": "Sticky Note30"
    },
    {
      "parameters": {
        "resource": "folder",
        "name": "={{ $('Global Constants').item.json.constants.course_name }}_FFMPEG",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Create folder').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -8016,
        2624
      ],
      "id": "8006ef85-ebaf-4c72-8f01-db43b6d55246",
      "name": "Create folder4",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "mode": "chooseBranch",
        "numberInputs": 4,
        "useDataOfInput": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -7536,
        2384
      ],
      "id": "1cca0d51-9e73-4f8c-9aa3-d8ea6972855d",
      "name": "Merge2"
    },
    {
      "parameters": {
        "operation": "sendAndWait",
        "sendTo": "gmailsendern8n.reflex734@passmail.net",
        "subject": "=Upload File & Approve Request",
        "message": "=Please do the following:\n\nUpload the SRT files to the folder called Docs, which you should find here:\nhttps://drive.google.com/drive/u/0/folders/{{ $json.id }}\n\nOnce done, approve the request.",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -7264,
        2416
      ],
      "id": "430db255-e8bc-4ec0-9f0c-778959269cb1",
      "name": "Send message and wait for response4",
      "webhookId": "341a921a-6a5d-4506-9ab5-6f4c54073fc9",
      "credentials": {
        "gmailOAuth2": {
          "id": "Vn1zFRIxiwOZxM5S",
          "name": "Admin Gmail Account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants1').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants1').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "={{ $('Global Constants1').first().json.constants.Status_1 }}",
            "Lesson Number": "={{ $('Download file').item.json.name.split(\" \")[0] }}",
            "Chapter Number": "={{ $('Loop Over Items').item.json.name.split(\" \")[0] }}",
            "Chapter Name": "={{ $('Loop Over Items').item.json.name.split(\"- \")[1] }}",
            "Lesson Name": "={{ $('Download file').item.json.name.split(\"_en\")[0].replace(/^\\d+\\s+/, '') }}",
            "SCRIPT": "={{ $json.cleanedText }}",
            "ID": "={{$('Loop Over Items').item.json.name.split(\" -\")[0] }}_{{ $('Download file').item.json.name.split(\" \")[0] }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -6096,
        3104
      ],
      "id": "cba58936-5957-40b8-b9d1-6ac56a78da16",
      "name": "Append row in sheet1",
      "retryOnFail": true,
      "executeOnce": false,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -9408,
        2416
      ],
      "id": "b66fe1ca-4d48-4a37-83ca-fbed88b708d0",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-globals.globalConstants",
      "typeVersion": 1,
      "position": [
        -9152,
        2416
      ],
      "id": "f849edb3-22f5-4482-91bb-c8a3926487fe",
      "name": "Global Constants",
      "credentials": {
        "globalConstantsApi": {
          "id": "JSzJUsH8Uy5bsaoy",
          "name": "ULTIMA Online Course Creation"
        }
      }
    },
    {
      "parameters": {
        "content": "",
        "height": 272,
        "width": 432,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -9456,
        2336
      ],
      "typeVersion": 1,
      "id": "e5c8a91a-5f5f-44a1-a308-ccd0bb445e4a",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "returnAll": true,
        "filter": {
          "folderId": {
            "__rl": true,
            "value": "={{ $json.constants.doc_folder_id }}",
            "mode": "id"
          },
          "whatToSearch": "folders"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -6736,
        2416
      ],
      "id": "13dd79e5-457e-41e6-bff3-10acb9e0d6bc",
      "name": "Search files and folders1",
      "alwaysOutputData": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -7440,
        3088
      ],
      "id": "51eb83e3-c979-448c-9168-f893d8d4932c",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "returnAll": true,
        "filter": {
          "folderId": {
            "__rl": true,
            "value": "={{ $json.id }}",
            "mode": "id"
          },
          "whatToSearch": "files"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -7072,
        3104
      ],
      "id": "c9787d8c-34cc-4cc7-a38f-ac8d6fca1244",
      "name": "Search files and folders2",
      "alwaysOutputData": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "name"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.sort",
      "typeVersion": 1,
      "position": [
        -6896,
        3104
      ],
      "id": "2a9ecbb4-b247-447f-9127-ecbc13aed190",
      "name": "Sort1"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Get the SRT content - adjust this line based on how n8n passes the data\n// Common ways: $json.content, $input.item.json.content, or items[0].json.content\nconst srtContent = $json.data; // Adjust field name as needed\n\n// Function to clean SRT and extract only text\nfunction cleanSRT(srtText) {\n  // Split into lines\n  const lines = srtText.split('\\n');\n  \n  const textLines = [];\n  \n  for (let i = 0; i < lines.length; i++) {\n    const line = lines[i].trim();\n    \n    // Skip empty lines\n    if (line === '') continue;\n    \n    // Skip sequence numbers (lines that are just digits)\n    if (/^\\d+$/.test(line)) continue;\n    \n    // Skip timecode lines (contain -->)\n    if (line.includes('-->')) continue;\n    \n    // This is actual subtitle text - keep it\n    textLines.push(line);\n  }\n  \n  // Join all text lines with spaces (or use '\\n' for line breaks)\n  return textLines.join(' ');\n}\n\n// Process the SRT content\nconst cleanedText = cleanSRT(srtContent);\n\n// Return the result for n8n\nreturn {\n  json: {\n    cleanedText: cleanedText\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -6336,
        3104
      ],
      "id": "6b23a5fa-b593-47a6-b83b-ad1a14b376c9",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "operation": "text",
        "options": {}
      },
      "id": "c42d2307-43f0-481c-8162-84fbb42fd66e",
      "name": "Extract text from Binary File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -6544,
        3104
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -6720,
        3104
      ],
      "id": "cd3bf36e-816c-461e-b121-7ab265b1dfd2",
      "name": "Download file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=## Opening Instruction:\n{{ $('Code in JavaScript1').item.json.opening_instruction }}\n\n## AVOID THESE RECENT OPENINGS\n\n{{ $('Redis').item.json.propertyName }}\n\n## SCRIPT TO REWRITE\n{{ $('Code in JavaScript').item.json.cleanedText }}",
        "hasOutputParser": true,
        "needsFallback": true,
        "options": {
          "systemMessage": "=You are an expert instructional designer who transforms course scripts into dramatically different, higher-quality versions for video narration. Your output must be TELEPROMPTER-READY prose that a narrator can read aloud without any editing.\n\n## OPENING STYLE FOR THIS SCRIPT\n\n{{ $('Code in JavaScript1').item.json.opening_instruction }}\n\nCRITICAL: You MUST follow the opening style instruction above. Do NOT default to \"Imagine this,\" \"Picture this,\" or any repetitive pattern. The opening style has been randomly selected to ensure variety across all scripts in the course.\n\n## AVOID THESE RECENT OPENINGS\n\n{{ $('Redis').item.json.propertyName }}\n\nCRITICAL: Your opening must be completely different from all the openings listed above. If your opening uses similar phrasing, word patterns, or structure to any of these, you MUST rewrite it. This is non-negotiable.\n\n## Your Mission\n\n## CRITICAL: Word Count Requirement\n\nThe rewritten script MUST stay within ±15% of the original word count.\n\nOriginal word count: {{ $('Code in JavaScript3').item.json.original_word_count }}\nTarget range: {{ Math.floor($('Code in JavaScript3').item.json.original_word_count * 0.85) }} - {{ Math.ceil($('Code in JavaScript3').item.json.original_word_count * 1.15) }} words\n\nVERIFICATION BEFORE FINALIZING:\n- Count words in your rewritten script\n- If below 85% of original: ADD more detail, examples, or explanations\n- If above 115% of original: TRIM unnecessary content\n- The goal is TRANSFORMATION, not SUMMARIZATION\n\nRemember: \"Dramatically different\" means different approach and style, NOT shorter length. Match the original's depth and coverage while changing everything else.\n\nCreate a rewrite SO DIFFERENT that students wouldn't recognize it as the same lesson, but that:\n- Teaches the same learning objectives\n- Maintains the same difficulty level\n- Stays within ±15% word count\n- Matches the style established in previous lessons (per Google Sheet)\n- Uses completely new examples (check Google Sheet to avoid repetition)\n- Is FULLY READY for a narrator to read from a teleprompter\n\n## CRITICAL: Opening Variety Requirement\n\nFORBIDDEN OPENING PATTERNS (never use these):\n- \"Imagine this...\"\n- \"Picture this...\"\n- \"Think about...\"\n- \"Consider this...\"\n- \"Let's start by...\"\n- \"Have you ever...\"\n- \"What if...\"\n\nYour opening MUST follow the specific style provided above AND must be different from all recent openings shown earlier. Do not deviate from these requirements.\n\nVERIFICATION BEFORE FINALIZING YOUR SCRIPT:\n- Check your opening sentence against the style instruction provided\n- Compare your opening to ALL the recent openings listed above\n- If it starts with any forbidden pattern, STOP and rewrite\n- If it's similar to any recent opening, STOP and rewrite with genuinely different phrasing\n- Ensure your opening is genuinely fresh and matches the assigned style\n- Confirm it fits the lesson content naturally\n\n## CRITICAL: Teleprompter-Ready Format Requirements\n\nYour rewritten script MUST be:\n\n**Continuous Flowing Prose**\n- Write in complete paragraphs that flow naturally when spoken\n- NO bullet points, numbered lists, or visual formatting\n- NO section headers or titles within the script\n- NO emojis, symbols, or special characters\n- NO parenthetical asides or bracketed content\n- NO \"Note:\" or \"Important:\" callouts\n\n**Natural Speech Patterns**\n- Write as if speaking directly to a viewer\n- Use conversational transitions (\"Now, let's explore...\", \"Here's what's interesting...\", \"Here's the thing...\")\n- Vary sentence length for natural rhythm\n- Use rhetorical questions naturally embedded in prose\n- Write contractions if they match the style guide (you'll, we're, it's)\n\n**Speakable Content Only**\n- Everything must sound natural when read aloud\n- Avoid written-only constructions like \"see below\" or \"as shown above\"\n- Don't reference visual elements the narrator can't describe naturally\n- Replace any list with flowing sentences (\"There are three key aspects. First... Second... Third...\")\n\n**Example of WRONG format** (not teleprompter-ready):\n\nExample 1: Lists and Bullet Points\nNeural networks have three main components:\n- Input layer - receives data\n- Hidden layers - process information\n- Output layer - produces results\n\nBenefits of neural networks:\n- Pattern recognition\n- Adaptability\n- Scalability\n\nExample 2: Section Headers and Callouts\nIntroduction to Backpropagation\n\nBackpropagation is a key algorithm in machine learning.\n\nHow It Works:\nThe algorithm calculates gradients and adjusts weights accordingly.\n\n**Important:** This process happens in reverse order!\n\nNote: Remember that learning rate affects convergence.\n\n**Example of CORRECT format** (teleprompter-ready):\n\nExample 1: CORRECT format (teleprompter-ready):\n\nNeural networks are built from three main components working together. First, there's the input layer, which receives the raw data you want to analyze. Then come the hidden layers, where the real magic happens as they process and transform that information. Finally, the output layer produces the results you're looking for. What makes neural networks so powerful are their key strengths. They excel at recognizing patterns that might be invisible to traditional algorithms. They're remarkably adaptable, learning and improving from experience. And they scale beautifully, handling everything from small datasets to massive amounts of information.\n\nExample 2: CORRECT format (teleprompter-ready):\n\nLet's dive into backpropagation, one of the most important algorithms in machine learning. This clever technique is what allows neural networks to learn from their mistakes. Here's how it works. The algorithm calculates gradients, which tell us how wrong our predictions were, and then adjusts the network's weights to improve future predictions. What's fascinating is that this process happens in reverse order, flowing backward through the network from output to input. One thing you'll want to keep in mind is that the learning rate, which controls how big those adjustments are, plays a crucial role in whether your network converges smoothly or struggles to learn.\n\n## Transformation Strategies\n\n1. **Change pedagogical structure**: If original is definition-first, try problem-first or story-first\n2. **Replace ALL examples**: Use different domains (tech → nature, abstract → concrete)\n3. **Use different explanations**: New analogies, different mental models\n4. **Reorganize flow**: Different sequencing while maintaining logic\n5. **Natural narration flow**: Smooth transitions, conversational tone, speakable prose\n\n## Tool Usage (In Order)\n\n1. **Google Sheet** (FIRST, MANDATORY): Check terminology, tone, examples to avoid, speech patterns\n2. **Vector Store** (5-10 queries): Verify facts against textbook, find alternative explanations\n3. **Web Search** (0-4): Current statistics, modern examples only\n4. **Jina Research** (0-2): Deep insights on evolving topics only\n\n## Critical Rules\n\n✓ MUST follow the opening style instruction provided above\n✓ MUST avoid all recent openings listed above\n✓ MUST be continuous prose (no bullets, lists, headers, or formatting)\n✓ MUST sound natural when read aloud\n✓ MUST match terminology from Google Sheet\n✓ MUST match tone/style from Google Sheet  \n✓ MUST avoid examples used in previous lessons\n✓ MUST verify all facts against textbook\n✓ MUST replace 100% of examples from original\n✓ MUST NOT use \"Imagine this\" or any forbidden opening patterns\n\n## Process\n\n1. Extract learning objectives from original\n2. Count words in original script → note the target range\n3. Query Vector Store → understand textbook perspective\n4. Plan transformation → choose new approach that works for narration\n5. Write from scratch as flowing prose following the assigned opening style\n6. **COUNT WORDS IN YOUR DRAFT** → verify you're within ±15%\n7. If too short: Expand with more detail, deeper explanations, additional examples\n8. If too long: Tighten prose, remove redundancy\n9. Read it aloud mentally → does it sound natural?\n10. Remove any bullets/lists/formatting → convert to flowing sentences\n11. Final verification → opening matches style AND differs from recent openings, facts correct, **word count within range**, consistency, no plagiarism, teleprompter-ready\n\n## Writing Voice for Narration\n\n- Address the viewer directly (\"you'll learn\", \"let's explore\", \"think about situations where...\")\n- Use natural pauses with punctuation\n- Build momentum with varied sentence rhythm\n- Create engagement through storytelling and examples woven into prose\n- Make transitions smooth (\"Now that we understand X, let's turn to Y...\")\n- End sections with natural conclusions, not abrupt stops\n\nRemember: A narrator should be able to sit down, read your script from start to finish without any changes, and deliver an engaging, clear lesson. Every word you write will be spoken aloud exactly as written. Your opening MUST follow the specific style instruction provided at the top of this message AND must be distinctly different from all recent openings listed above.",
          "batching": {
            "batchSize": 1,
            "delayBetweenBatches": 1000
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -4368,
        2736
      ],
      "id": "082d3d89-03fa-4ebe-8eaf-a71879da7136",
      "name": "AI Agent",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\nreturn { randomString: result };"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -5072,
        2736
      ],
      "id": "8e24d3b5-8c10-4437-a620-5304a3c2678a",
      "name": "Code in JavaScript2"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code in JavaScript2').item.json.randomString }}",
        "contextWindowLength": 32
      },
      "type": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "typeVersion": 1.5,
      "position": [
        -3952,
        2480
      ],
      "id": "5c9d4dbf-39b3-4cd6-a7be-0aa98ebab501",
      "name": "Redis Chat Memory",
      "credentials": {
        "redis": {
          "id": "4nD9S5LZCArxPB81",
          "name": "Redis (NO EXPIRATION)"
        }
      }
    },
    {
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "count": 3,
        "additionalParameters": {
          "search_lang": "en"
        }
      },
      "type": "@brave/n8n-nodes-brave-search.braveSearchTool",
      "typeVersion": 1,
      "position": [
        -4224,
        2432
      ],
      "id": "801158a3-0bc3-4fdc-8447-cf846fab5319",
      "name": "Brave Search",
      "credentials": {
        "braveSearchApi": {
          "id": "4yKxSu1Rx4YYMObx",
          "name": "Brave Search Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"rewritten_script\": {\n      \"type\": \"string\",\n      \"minLength\": 100,\n      \"description\": \"Complete teleprompter-ready script in continuous prose. NO bullet points, lists, headers, emojis, or formatting. Must be natural spoken narration that flows from start to finish.\"\n    },\n    \"metadata\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lesson_id\": {\"type\": \"string\"},\n        \"original_word_count\": {\"type\": \"integer\"},\n        \"rewritten_word_count\": {\"type\": \"integer\"},\n        \"word_count_change_percent\": {\"type\": \"number\"},\n        \"within_target\": {\n          \"type\": \"boolean\",\n          \"description\": \"Within ±15% of original word count\"\n        },\n        \"teleprompter_ready_confirmed\": {\n          \"type\": \"boolean\",\n          \"description\": \"Confirmed script is continuous prose with no formatting\"\n        },\n        \"opening_style_used\": {\n          \"type\": \"string\",\n          \"description\": \"The opening style that was assigned and used for this script\"\n        }\n      },\n      \"required\": [\"lesson_id\", \"original_word_count\", \"rewritten_word_count\", \"within_target\", \"teleprompter_ready_confirmed\", \"opening_style_used\"]\n    },\n    \"transformation_summary\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"pedagogical_change\": {\n          \"type\": \"string\",\n          \"examples\": [\"Changed from definition-first to problem-first narrative approach\"]\n        },\n        \"major_changes\": {\n          \"type\": \"array\",\n          \"items\": {\"type\": \"string\"},\n          \"description\": \"3-5 key transformations made\",\n          \"examples\": [\n            \"Replaced all tech examples with nature-based analogies\",\n            \"Restructured as a story-driven narrative\",\n            \"Changed from passive explanations to active viewer engagement\",\n            \"Added conversational transitions throughout\",\n            \"Transformed abstract concepts into concrete scenarios\"\n          ],\n          \"minItems\": 3,\n          \"maxItems\": 5\n        },\n        \"example_replacement_rate\": {\n          \"type\": \"integer\",\n          \"description\": \"Percentage of examples replaced (target: 100)\",\n          \"minimum\": 0,\n          \"maximum\": 100\n        },\n        \"narration_style_notes\": {\n          \"type\": \"string\",\n          \"description\": \"Notes on how the script works for spoken delivery\",\n          \"examples\": [\n            \"Conversational with natural pauses, varied sentence rhythm for engagement\",\n            \"Direct address throughout, builds from simple to complex smoothly\"\n          ]\n        }\n      },\n      \"required\": [\"pedagogical_change\", \"major_changes\", \"example_replacement_rate\"]\n    },\n    \"sources_consulted\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"source\": {\n            \"type\": \"string\",\n            \"enum\": [\"vector_store\", \"web_search\"]\n          },\n          \"purpose\": {\"type\": \"string\"}\n        },\n        \"required\": [\"source\", \"purpose\"]\n      },\n      \"minItems\": 1\n    },\n    \"verification\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"learning_objectives_preserved\": {\"type\": \"boolean\"},\n        \"facts_verified\": {\"type\": \"boolean\"},\n        \"no_repeated_examples\": {\"type\": \"boolean\"},\n        \"no_plagiarism\": {\"type\": \"boolean\"},\n        \"opening_matches_assigned_style\": {\n          \"type\": \"boolean\",\n          \"description\": \"Confirmed: opening follows the assigned style instruction\"\n        },\n        \"opening_differs_from_recent\": {\n          \"type\": \"boolean\",\n          \"description\": \"Confirmed: opening is distinctly different from all recent script openings\"\n        },\n        \"no_forbidden_patterns\": {\n          \"type\": \"boolean\",\n          \"description\": \"Confirmed: opening does NOT use 'Imagine this', 'Picture this', or other forbidden patterns\"\n        },\n        \"teleprompter_format_verified\": {\n          \"type\": \"boolean\",\n          \"description\": \"Confirmed: continuous prose, no bullets/lists/headers/formatting\"\n        },\n        \"reads_naturally_aloud\": {\n          \"type\": \"boolean\",\n          \"description\": \"Confirmed: script sounds natural when read aloud\"\n        }\n      },\n      \"required\": [\n        \"learning_objectives_preserved\",\n        \"facts_verified\",\n        \"no_repeated_examples\",\n        \"no_plagiarism\",\n        \"opening_matches_assigned_style\",\n        \"opening_differs_from_recent\",\n        \"no_forbidden_patterns\",\n        \"teleprompter_format_verified\",\n        \"reads_naturally_aloud\"\n      ]\n    },\n    \"self_assessment\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"transformation_depth\": {\n          \"type\": \"integer\",\n          \"minimum\": 1,\n          \"maximum\": 10,\n          \"description\": \"How different from original (target: 8+)\"\n        },\n        \"pedagogical_quality\": {\n          \"type\": \"integer\",\n          \"minimum\": 1,\n          \"maximum\": 10,\n          \"description\": \"Quality improvement (target: 7+)\"\n        },\n        \"narration_readiness\": {\n          \"type\": \"integer\",\n          \"minimum\": 1,\n          \"maximum\": 10,\n          \"description\": \"How ready for teleprompter narration (target: 10)\"\n        },\n        \"opening_uniqueness\": {\n          \"type\": \"integer\",\n          \"minimum\": 1,\n          \"maximum\": 10,\n          \"description\": \"How different the opening is from recent scripts (target: 9+)\"\n        },\n        \"confidence\": {\n          \"type\": \"string\",\n          \"enum\": [\"high\", \"medium\", \"low\"]\n        }\n      },\n      \"required\": [\"transformation_depth\", \"pedagogical_quality\", \"narration_readiness\", \"opening_uniqueness\", \"confidence\"]\n    },\n    \"concerns\": {\n      \"type\": \"array\",\n      \"items\": {\"type\": \"string\"},\n      \"description\": \"Any issues needing human review (empty array if none)\"\n    }\n  },\n  \"required\": [\n    \"rewritten_script\",\n    \"metadata\",\n    \"transformation_summary\",\n    \"sources_consulted\",\n    \"verification\",\n    \"self_assessment\"\n  ]\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -4128,
        2896
      ],
      "id": "6ed460fb-b43f-4cc4-a157-9794e28fbf10",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -4128,
        3008
      ],
      "id": "fa23a607-f9ce-4111-ae48-cb8ec45d3077",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Provides supplementary information to the AI agent allowing it to write better scripts.",
        "qdrantCollection": {
          "__rl": true,
          "value": "CompTIASecurity",
          "mode": "list",
          "cachedResultName": "CompTIASecurity"
        },
        "topK": 15,
        "useReranker": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        -4512,
        2896
      ],
      "id": "f9960e0f-2f5b-4df9-b2f7-2f6cc68e1731",
      "name": "Qdrant Vector Store",
      "credentials": {
        "qdrantApi": {
          "id": "f4OYPtbhAv74DCJ1",
          "name": "Qdrant API"
        }
      }
    },
    {
      "parameters": {
        "modelName": "embed-english-v3.0"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        -4528,
        3008
      ],
      "id": "4fa1b5c2-e5ab-45a9-8a74-19e96e500b8e",
      "name": "Embeddings Cohere",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "topN": 6
      },
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "typeVersion": 1,
      "position": [
        -4432,
        3008
      ],
      "id": "69c2fb99-23e4-4743-9c54-295f3f894649",
      "name": "Reranker Cohere",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "model": "mistral-large-latest",
        "options": {
          "temperature": 0.9,
          "topP": 0.8
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        -4592,
        2464
      ],
      "id": "9884e7cc-c359-4fe7-8eeb-321b567729a4",
      "name": "Mistral Cloud Chat Model1",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants5').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants5').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ID": "={{ $('Loop Over Items2').item.json.ID }}",
            "Rewritten Script": "={{ $json.output.rewritten_script }}",
            "STATUS": "={{ $('Global Constants5').first().json.constants.Status_4 }}"
          },
          "matchingColumns": [
            "ID"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -3920,
        2720
      ],
      "id": "d18bc681-7a43-407f-9d82-a0afd49b9ea1",
      "name": "Update row in sheet1",
      "retryOnFail": true,
      "executeOnce": false,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "months",
              "monthsInterval": 365,
              "triggerAtDayOfMonth": 31
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -7264,
        2160
      ],
      "id": "16ade1a0-82ec-46e0-8b61-9c255456b6e8",
      "name": "Schedule Trigger1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-globals.globalConstants",
      "typeVersion": 1,
      "position": [
        -6976,
        2416
      ],
      "id": "9ee75b60-3599-4669-ac8f-c7b073e65372",
      "name": "Global Constants1",
      "executeOnce": true,
      "credentials": {
        "globalConstantsApi": {
          "id": "JSzJUsH8Uy5bsaoy",
          "name": "ULTIMA Online Course Creation"
        }
      }
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -3056,
        3040
      ],
      "id": "af8d4ff3-49b2-4feb-93f0-ee9735c55c6d",
      "name": "Wait",
      "webhookId": "c5c4ac51-a700-4196-b655-df3d71140d34",
      "executeOnce": true
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants5').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants5').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ID": "={{ $('Loop Over Items2').item.json.ID }}",
            "Rewritten Script": "={{ $json.output.rewritten_script }}",
            "STATUS": "={{ $('Global Constants5').first().json.constants.Status_9 }}"
          },
          "matchingColumns": [
            "ID"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -3552,
        3040
      ],
      "id": "858476f6-2f79-402b-b0ad-68bc36fa7780",
      "name": "Update row in sheet2",
      "retryOnFail": true,
      "executeOnce": false,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 198,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7312,
        2128
      ],
      "typeVersion": 1,
      "id": "67938ff5-5df0-4a80-a9c8-ebbfdfce0d82",
      "name": "Sticky Note32"
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 198,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7024,
        2384
      ],
      "typeVersion": 1,
      "id": "bb0b27d0-48c8-46b8-a929-dd4f7d41bb83",
      "name": "Sticky Note37"
    },
    {
      "parameters": {
        "content": "### Add Google Sheet ID + Doc Folder ID",
        "height": 80,
        "width": 198,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7040,
        2336
      ],
      "typeVersion": 1,
      "id": "a7b80c36-13c1-48fb-9254-e050fd8b2495",
      "name": "Sticky Note38"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-globals.globalConstants",
      "typeVersion": 1,
      "position": [
        -4784,
        1808
      ],
      "id": "75bb88c1-ae31-4f6f-a269-211c96e9a4c5",
      "name": "Global Constants3",
      "executeOnce": true,
      "credentials": {
        "globalConstantsApi": {
          "id": "JSzJUsH8Uy5bsaoy",
          "name": "ULTIMA Online Course Creation"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "months",
              "monthsInterval": 365,
              "triggerAtDayOfMonth": 31
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -5248,
        1808
      ],
      "id": "25036db6-15aa-49f8-b5a2-f463a97c8ee1",
      "name": "Schedule Trigger3"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "={{ $json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "STATUS",
              "lookupValue": "={{ $json.constants.Status_4 }}"
            },
            {
              "lookupColumn": "STATUS",
              "lookupValue": "={{ $json.constants.Status_8 }}"
            }
          ]
        },
        "combineFilters": "OR",
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -4592,
        1808
      ],
      "id": "39a6b727-9733-4d0c-b738-3a8dd7b5deb2",
      "name": "Get row(s) in sheet1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "4a937b1b-d266-4f17-a812-a0280f5e961f",
              "leftValue": "={{ $json.STATUS }}",
              "rightValue": "={{ $('Global Constants3').item.json.constants.Status_8 }}",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -4432,
        1808
      ],
      "id": "9a1ae26c-fc70-457a-baa1-41eaa9fdccb3",
      "name": "If3"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.randomString }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -1952,
        1168
      ],
      "id": "5fe9cda5-0f90-4e20-a074-6c87ac18f7f6",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Here is the script:\n\n{{ $('Get row(s) in sheet1').item.json['Rewritten Script'] }}",
        "hasOutputParser": true,
        "needsFallback": true,
        "options": {
          "systemMessage": "=You are a script segmentation specialist. Your ONLY job is to split a script into segments at natural breakpoints. You must preserve the original text EXACTLY.\n\nCRITICAL RULES - READ CAREFULLY:\n\nRULE 1: ZERO EDITING ALLOWED\n- DO NOT rephrase, reword, paraphrase, or summarize ANY part of the script\n- DO NOT fix grammar, spelling, or punctuation\n- DO NOT improve sentence structure or clarity\n- DO NOT remove redundancies or repetition\n- The ONLY changes allowed: Remove the literal string \"/n\" (not actual line breaks), remove zero-width characters, remove duplicate spaces, trim leading/trailing whitespace\n- This is a SPLITTING task, not a writing task\n\nRULE 2: WORD COUNT MUST MATCH\n- Count words in the original input script\n- After segmentation, count words across all segments combined\n- These counts MUST be equal (within 1-2 words for whitespace handling)\n- If word counts don't match, you have edited the text - THIS IS FORBIDDEN\n\nRULE 3: SEGMENT AT NATURAL BREAKPOINTS ONLY\n- Find existing sentence boundaries where topics shift\n- Look for: section transitions, topic changes, \"Now let's...\", \"Next...\", etc.\n- Each segment = one slide's worth of narration\n- Target 8-16 segments total\n- Each segment must be 80+ words\n- No segment should exceed 15% of total script length\n- Always start segments at sentence beginnings\n- Always end segments at sentence ends (full stops)\n\nYOUR PROCESS:\n1. Read the entire script WITHOUT making any changes\n2. Identify natural breakpoints (topic shifts, transitions)\n3. Split the script at these breakpoints\n4. Verify each segment starts and ends at sentence boundaries\n5. BEFORE OUTPUTTING: Count words in your segments vs. original input\n6. If counts don't match, you've edited - start over\n\nOUTPUT REQUIREMENTS:\n- Provide segmentation in valid JSON format\n- Each segment must include segment_number, text, and word_count\n- total_word_count must equal original_word_count (within 2 words)\n- word_count_match should be true if counts match\n- Segments must be numbered sequentially starting from 1\n\nQUALITY CHECKS:\n✓ 8-16 segments total\n✓ Sequential segment_numbers starting from 1\n✓ Each segment ≥80 words\n✓ No segment >15% of total length\n✓ Word count matches original (within 2 words)\n✓ All segments start and end at sentence boundaries\n✓ NO text has been reworded, rephrased, or edited\n\nREMEMBER: You are a SPLITTER, not a WRITER. Preserve the exact original text. Your job is to find the natural breakpoints where slides should change, nothing more."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -2256,
        1280
      ],
      "id": "667d774a-6974-42b6-9383-5ba40d13bc40",
      "name": "AI Agent4",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -2176,
        1552
      ],
      "id": "83ef7cf0-ecf0-427f-9873-286699e82744",
      "name": "OpenAI Chat Model6",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"segments\": {\n      \"type\": \"array\",\n      \"minItems\": 8,\n      \"maxItems\": 16,\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"segment_number\": {\n            \"type\": \"integer\",\n            \"minimum\": 1\n          },\n          \"text\": {\n            \"type\": \"string\"\n          },\n          \"word_count\": {\n            \"type\": \"integer\",\n            \"minimum\": 80\n          }\n        },\n        \"required\": [\"segment_number\", \"text\", \"word_count\"],\n        \"additionalProperties\": false\n      }\n    },\n    \"total_segments\": {\n      \"type\": \"integer\",\n      \"minimum\": 8,\n      \"maximum\": 16\n    },\n    \"total_word_count\": {\n      \"type\": \"integer\"\n    },\n    \"original_word_count\": {\n      \"type\": \"integer\"\n    },\n    \"word_count_match\": {\n      \"type\": \"boolean\"\n    }\n  },\n  \"required\": [\n    \"segments\",\n    \"total_segments\",\n    \"total_word_count\",\n    \"original_word_count\",\n    \"word_count_match\"\n  ],\n  \"additionalProperties\": false\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -2176,
        1408
      ],
      "id": "99a28a87-68e0-4eef-80a4-69d589a74bf4",
      "name": "Structured Output Parser4"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.randomString }}",
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -3536,
        1712
      ],
      "id": "eea73d67-2656-46fd-80b2-5170afd8b6d4",
      "name": "Simple Memory2"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Here is the script:\n\n{{ $('Get row(s) in sheet1').item.json['Rewritten Script'] }}",
        "hasOutputParser": true,
        "needsFallback": true,
        "options": {
          "systemMessage": "=You are an expert video script evaluator specializing in online educational content. Your role is to provide thorough, constructive appraisals of video scripts for online courses.\n\nEVALUATION CRITERIA:\n\n1. CLARITY & COMPREHENSION\n- Is the content easy to understand for the target audience?\n- Are concepts explained clearly with appropriate examples?\n- Is technical jargon either avoided or properly explained?\n\n2. ENGAGEMENT & RETENTION\n- Does the script capture and maintain viewer attention?\n- Are there hooks, questions, or engagement techniques used?\n- Is the pacing appropriate (not too fast or too slow)?\n\n3. STRUCTURE & FLOW\n- Does the script follow a logical progression?\n- Are transitions between topics smooth and natural?\n- Is there a clear introduction, body, and conclusion?\n\n4. EDUCATIONAL EFFECTIVENESS\n- Are learning objectives clear and achievable?\n- Is information presented in a pedagogically sound manner?\n- Are there opportunities for knowledge application or practice?\n\n5. PRODUCTION READINESS\n- Is the script written in a conversational, spoken style?\n- Are visual cues or on-screen elements properly indicated?\n- Is the length appropriate for the content (typically 5-15 minutes)?\n\n6. TONE & DELIVERY\n- Is the tone appropriate for the subject and audience?\n- Does the script sound natural when read aloud?\n- Is it free from awkward phrasing or overly formal language?\n\nPASS/FAIL CRITERIA:\n- PASS: Overall score ≥ 7/10, no critical issues present, educational effectiveness ≥ 7/10\n- FAIL: Overall score < 7/10, OR critical issues present, OR educational effectiveness < 7/10\n\nEVALUATION APPROACH:\n- Be constructive and specific in your feedback\n- Rate each dimension on a scale of 1-10\n- Identify key areas for improvement\n- Provide clear, actionable feedback for each criterion\n- Deliver an overall assessment that summarizes the script's quality\n\nOUTPUT REQUIREMENTS:\n- Provide evaluation in valid JSON format only\n- Use the exact field names specified in the schema\n- The criterion_feedback array must contain exactly 6 objects with these criterion values: \"clarity_comprehension\", \"engagement_retention\", \"structure_flow\", \"educational_effectiveness\", \"production_readiness\", \"tone_delivery\"\n- pass_fail must be either \"PASS\" or \"FAIL\"\n- All scores must be integers between 1 and 10"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -3840,
        1824
      ],
      "id": "08035368-afb7-4ece-80d3-9257173136b3",
      "name": "AI Agent5",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -3776,
        2112
      ],
      "id": "981eeb71-7f49-4748-969a-a547d7d0ef6e",
      "name": "OpenAI Chat Model8",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"pass_fail\": {\n      \"type\": \"string\",\n      \"enum\": [\"PASS\", \"FAIL\"]\n    },\n    \"overall_score\": {\n      \"type\": \"integer\",\n      \"minimum\": 1,\n      \"maximum\": 10\n    },\n    \"overall_feedback\": {\n      \"type\": \"string\"\n    },\n    \"areas_for_improvement\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"criterion_feedback\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"criterion\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"clarity_comprehension\",\n              \"engagement_retention\",\n              \"structure_flow\",\n              \"educational_effectiveness\",\n              \"production_readiness\",\n              \"tone_delivery\"\n            ]\n          },\n          \"score\": {\n            \"type\": \"integer\",\n            \"minimum\": 1,\n            \"maximum\": 10\n          },\n          \"feedback\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\"criterion\", \"score\", \"feedback\"],\n        \"additionalProperties\": false\n      },\n      \"minItems\": 6,\n      \"maxItems\": 6\n    }\n  },\n  \"required\": [\n    \"pass_fail\",\n    \"overall_score\",\n    \"overall_feedback\",\n    \"areas_for_improvement\",\n    \"criterion_feedback\"\n  ],\n  \"additionalProperties\": false\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -3776,
        1968
      ],
      "id": "2d67a135-3b7b-4496-8999-1fa9b37c931b",
      "name": "Structured Output Parser5"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\nreturn { randomString: result };"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -4128,
        1824
      ],
      "id": "3a4eadc5-209d-44e5-83aa-65ccc086d7bb",
      "name": "Code in JavaScript5"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "=QC_{{ $json.output.pass_fail }}",
            "row_number": "={{ $('Get row(s) in sheet1').item.json.row_number }}",
            "AI NOTES": "=Overall Score: {{ $json.output.overall_score }}{{ \"\\n\" }}{{ \"\\n\" }}Overall Assessment: {{ $json.output.overall_feedback }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -3280,
        1616
      ],
      "id": "57ca1d05-730f-4d57-8e02-356eb3d35512",
      "name": "Update row in sheet",
      "retryOnFail": true,
      "executeOnce": false,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\nreturn { randomString: result };"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -2480,
        1280
      ],
      "id": "7b0e342b-1e75-4938-992f-dcca4832835a",
      "name": "Code in JavaScript6"
    },
    {
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        -3952,
        2032
      ],
      "id": "9102db8a-dc9e-4cfe-9e23-9baf403cc182",
      "name": "Mistral Cloud Chat Model2",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": "devstral-medium-latest",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        -2320,
        1488
      ],
      "id": "ccb7df46-69ed-4396-aa94-b25b76942ba4",
      "name": "Mistral Cloud Chat Model3",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.STATUS }}",
                    "rightValue": "QC_PASS",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "1ad64539-52f2-4752-841e-a39707210a85"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "QC_PASS"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f8acb959-298a-408a-aa70-4f2e3445e355",
                    "leftValue": "={{ $json.STATUS }}",
                    "rightValue": "QC_",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "ERROR"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "4c36bde3-3b5a-47b3-96b0-db3fd0b45d0d",
                    "leftValue": "={{ $json.STATUS }}",
                    "rightValue": "QC_FAIL",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "QC_FAIL"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -3040,
        1600
      ],
      "id": "3f4301c3-bfce-4487-adf9-d5708274d35b",
      "name": "Switch"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-4-20250514",
          "mode": "list",
          "cachedResultName": "Claude Sonnet 4"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        -3840,
        1664
      ],
      "id": "ba88af11-e43e-4a50-91a8-ca75a9ef125c",
      "name": "Anthropic Chat Model2",
      "credentials": {
        "anthropicApi": {
          "id": "5pMiFSPZL2r44q7L",
          "name": "Anthropic Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-haiku-4-5-20251001",
          "mode": "list",
          "cachedResultName": "Claude Haiku 4.5"
        },
        "options": {
          "thinking": true
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        -2256,
        1136
      ],
      "id": "493e7673-53c0-4170-88cf-df39219393ee",
      "name": "Anthropic Chat Model4",
      "credentials": {
        "anthropicApi": {
          "id": "5pMiFSPZL2r44q7L",
          "name": "Anthropic Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "={{ $('Global Constants3').first().json.constants.Status_10 }}",
            "row_number": "={{ $('Get row(s) in sheet1').first().json.row_number }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -1760,
        1632
      ],
      "id": "156e3dac-6c9b-4b2d-a5b1-2aacfae9ea8b",
      "name": "Update row in sheet7",
      "retryOnFail": true,
      "executeOnce": false,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "path": "03b6c9f8-f831-4266-864d-aeb3d5a97bd1",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -5248,
        1600
      ],
      "id": "e4d7ec39-912d-4068-82f3-e3646c4edc6d",
      "name": "Webhook1",
      "webhookId": "03b6c9f8-f831-4266-864d-aeb3d5a97bd1"
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/03b6c9f8-f831-4266-864d-aeb3d5a97bd1",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1200,
        1664
      ],
      "id": "56a60417-424c-4cd1-924c-19e4f31b3013",
      "name": "HTTP Request4",
      "executeOnce": true
    },
    {
      "parameters": {
        "fieldToSplitOut": "output.segments",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -1856,
        1264
      ],
      "id": "29d16712-d954-400b-a150-80abf7c6cbfe",
      "name": "Split Out"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -1408,
        1664
      ],
      "id": "9eeba902-9be5-48a8-943c-465cf96fe9a5",
      "name": "Wait2",
      "webhookId": "c5c4ac51-a700-4196-b655-df3d71140d34",
      "executeOnce": true
    },
    {
      "parameters": {
        "content": "",
        "height": 416,
        "width": 214,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5312,
        1552
      ],
      "typeVersion": 1,
      "id": "d21a9d42-908d-4894-b442-8db552f1bfa9",
      "name": "Sticky Note33"
    },
    {
      "parameters": {
        "content": "",
        "height": 640,
        "width": 1248,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2672,
        1056
      ],
      "typeVersion": 1,
      "id": "c6dd7fd1-3462-4178-9035-7c0bbefae4d4",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "",
        "height": 656,
        "width": 2048,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4832,
        1584
      ],
      "typeVersion": 1,
      "id": "067ea5ba-9c6f-4b34-9afe-365e914df88d",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "",
        "height": 944,
        "width": 2960,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5792,
        2352
      ],
      "typeVersion": 1,
      "id": "a86fab15-cdcf-45fb-83de-2379fbdbdd99",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "",
        "height": 352,
        "width": 1664,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7584,
        3024
      ],
      "typeVersion": 1,
      "id": "badd0e8a-4200-407e-81fd-f2d08655ab76",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "",
        "height": 800,
        "width": 2608,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8896,
        2096
      ],
      "typeVersion": 1,
      "id": "3cee4ff7-b519-43fa-a185-e996b442f55c",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "",
        "height": 240,
        "width": 470,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        1600
      ],
      "typeVersion": 1,
      "id": "a61e9a50-9c29-4e26-a01d-9f4bf345d752",
      "name": "Sticky Note35"
    },
    {
      "parameters": {
        "formTitle": "aaa",
        "formDescription": "aaa",
        "formFields": {
          "values": [
            {
              "fieldLabel": "aaa",
              "fieldType": "file"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        -7808,
        944
      ],
      "id": "abf08917-524e-405f-8fc7-dfac2c88810c",
      "name": "On form submission",
      "webhookId": "5088628d-67fd-41dc-816c-2e4f1292f48c",
      "disabled": true
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=http://qdrant:6333/collections/CompTIASecurity",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "qdrantRestApi",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"vectors\": {\n    \"size\": 1024,\n    \"distance\": \"Cosine\",\n    \"on_disk\": true\n  },\n  \"shard_number\": 1,  \n  \"replication_factor\": 1,  \n  \"write_consistency_factor\": 1,\n  \"hnsw_config\": { \"m\": 32, \"ef_construct\": 256, \"on_disk\": false },\n  \"optimizers_config\": { \"default_segment_number\": 1 }\n}",
        "options": {}
      },
      "id": "0e5ea431-f5cb-49a7-87da-20d56ad47fff",
      "name": "Create collection3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -8064,
        944
      ],
      "typeVersion": 4.2,
      "retryOnFail": true,
      "disabled": true
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $('Get row(s) in sheet7').item.json.PDF_ID }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -7840,
        688
      ],
      "id": "19fd6315-a98e-42b4-971c-b631c5deefec",
      "name": "Download file2",
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.mistral.ai/v1/files",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "mistralCloudApi",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "purpose",
              "value": "ocr"
            },
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -7488,
        944
      ],
      "id": "0cebfff4-9393-4ae0-9a57-6cc63458d28e",
      "name": "HTTP Request9",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "url": "=https://api.mistral.ai/v1/files/{{ $json.id }}/url",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "mistralCloudApi",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "expiry",
              "value": "24"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -7360,
        944
      ],
      "id": "b029f6b5-41f7-4e4d-b5ba-d9562629b7c1",
      "name": "HTTP Request10",
      "retryOnFail": true,
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.mistral.ai/v1/ocr",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "mistralCloudApi",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"mistral-ocr-latest\",\n  \"document\": {\n    \"type\": \"document_url\",\n    \"document_url\": \"{{ $json.url }}\"\n  },\n  \"include_image_base64\": true,\n  \"bbox_annotation_format\": {\n    \"type\": \"text\",\n    \"json_schema\": {\n      \"name\": \"visual_description\",\n      \"description\": \"Extract a concise natural language descreiption for each distinct visual element (image, chart, table, diagram etc.) on the page. Focus on summarizing what each visual element contains and/or conveys.\",\n      \"schema\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"string\",\n          \"description\": \"A concise description of a single visual element.\"\n        }\n      },\n      \"strict\": false\n    }\n  }\n}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -7168,
        944
      ],
      "id": "407adab6-d7d8-4f17-b544-803e70fac63c",
      "name": "HTTP Request11",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "fieldToSplitOut": "pages",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -8224,
        1216
      ],
      "id": "a2092cd8-d903-4fb6-9453-818c3b181f30",
      "name": "Split Out5",
      "disabled": true
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "/**\n * n8n Code node — Mode: \"Run Once for Each Item\"\n * Input shape expected per item:\n *   item.json.markdown : string\n *   item.json.images   : [{ id|file_name|filename, image_annotation|annotation|caption|legend, ... }, ...]\n *\n * Behavior:\n * - For each image, find a Markdown image tag that includes the filename (id) in its link target.\n * - Insert the image's annotation text immediately after that tag.\n * - If the tag is missing, append a new tag + annotation at the end.\n * - Idempotent via a hidden sentinel comment so re-runs don't duplicate inserts.\n */\n\nconst item = $input.item;\nconst json = item.json ?? {};\nlet md = String(json.markdown ?? '');\nconst images = Array.isArray(json.images) ? json.images : [];\n\n// Escape a string for use in a dynamic RegExp\nconst escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\nfor (const img of images) {\n  // Try common filename keys\n  const id =\n    (img && (img.id ?? img.file_name ?? img.filename)) || null;\n  if (!id) continue;\n\n  // Try common annotation keys\n  const annotation = String(\n    (img.image_annotation ?? img.annotation ?? img.caption ?? img.legend ?? '')\n  ).trim();\n\n  if (!annotation) continue;\n\n  // Prevent duplicate insertion on re-runs\n  const sentinel = `<!--image-annotation:${id}-->`;\n  if (md.includes(sentinel)) continue;\n\n  // Match the *first* Markdown image tag that contains this filename anywhere in the link target\n  // Example match: ![anything](img-1.jpeg) or ![alt](assets/img-1.jpeg)\n  const pattern = new RegExp(\n    `(!\\\\[[^\\\\]]*\\\\]\\\\([^\\\\)]*${escapeRegExp(id)}[^\\\\)]*\\\\))`\n  );\n\n  if (pattern.test(md)) {\n    // Insert annotation right after the found image tag\n    md = md.replace(pattern, `$1\\n\\n${annotation}\\n\\n${sentinel}`);\n  } else {\n    // If no tag exists, append a new tag + annotation to the end\n    md += `\\n\\n![${id}](${id})\\n\\n${annotation}\\n\\n${sentinel}`;\n  }\n}\n\nitem.json.markdown = md;\nreturn item;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -7440,
        1216
      ],
      "id": "5c6007a9-f47a-4aa0-b742-36dc5e9c8db4",
      "name": "Code2",
      "disabled": true
    },
    {
      "parameters": {
        "fieldToSplitOut": "images",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -7904,
        1456
      ],
      "id": "90065197-c1b8-44af-a9ff-96c5698bbda8",
      "name": "Split Out6",
      "disabled": true
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "eb17af95-de87-4469-9f28-25e736b7555b",
              "name": "file_name",
              "value": "={{$workflow.id.toString(36)}}{{$json.top_left_x.toString(36)}}{{$json.top_left_y}}{{$json.bottom_right_x.toString(36)}}{{$json.bottom_right_y.toString(36)}}",
              "type": "string"
            },
            {
              "id": "eb68e1c6-cddc-492e-abb7-73df0041c206",
              "name": "image_annotation",
              "value": "={{ $json.image_annotation }}",
              "type": "string"
            },
            {
              "id": "3fb34e0d-942b-438b-8b11-3dd2a236e153",
              "name": "image_base64",
              "value": "={{ $('Split Out6').item.json.image_base64.split(',')[1] }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -7648,
        1456
      ],
      "id": "459c5e25-9271-4e12-ba87-228bc04e89ce",
      "name": "Edit Fields2",
      "disabled": true
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "image_base64",
        "options": {
          "fileName": "={{ $('Edit Fields2').item.json.file_name }}"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        -7344,
        1456
      ],
      "id": "85cd644e-e972-417b-ae97-3cb44a21e5fb",
      "name": "Convert to File2",
      "disabled": true
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.cohere.com/v2/embed",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "cohereApi",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"model\": \"embed-v4.0\",\n    \"input_type\": \"image\",\n    \"embedding_types\": [\"float\"],\n    \"images\": [\"data:image/png;base64,{{ $('Edit Fields2').item.json.image_base64 }}\"],\n  \"output_dimension\": 1024\n  }",
        "options": {}
      },
      "id": "3f0d3f20-d146-4a5c-9991-fd29f75e2693",
      "name": "Image Embeddings with Cohere Embed 5",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -7040,
        1456
      ],
      "typeVersion": 4.2,
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2ac5f384-9c3c-4a2f-98a8-adaca1bee883",
              "name": "markdown",
              "value": "={{ $json.markdown }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -6976,
        1216
      ],
      "id": "afdef2c3-fcbe-4998-bd93-879001503db5",
      "name": "Edit Fields3",
      "disabled": true
    },
    {
      "parameters": {
        "modelName": "embed-english-v3.0"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        -6688,
        1392
      ],
      "id": "008623b6-7089-459a-85f9-d6c9949e8caa",
      "name": "Embeddings Cohere4",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "textSplittingMode": "custom",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        -6560,
        1392
      ],
      "id": "451a987d-2f53-4190-a65a-42c71bfbd661",
      "name": "Default Data Loader2",
      "disabled": true
    },
    {
      "parameters": {
        "chunkSize": 1600,
        "chunkOverlap": 240,
        "options": {
          "splitCode": "markdown"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -6560,
        1536
      ],
      "id": "df03fb11-2786-485c-9cf7-69c94b57dca7",
      "name": "Recursive Character Text Splitter2",
      "disabled": true
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -6096,
        1712
      ],
      "id": "b6e17c96-04e4-4594-b694-1ae112cff503",
      "name": "Merge3",
      "executeOnce": false,
      "disabled": true
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "points",
        "options": {}
      },
      "id": "87c43c47-11e1-443d-9c24-a540e3c95ce1",
      "name": "Aggregate Points2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -7456,
        1728
      ],
      "typeVersion": 1,
      "disabled": true
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "ba2dbe6f-d433-4ed8-9727-e4258017b79a",
              "name": "id",
              "type": "number",
              "value": "={{ $json.images[0].width }}{{ $json.images[0].height }}{{ $json.images[0].bit_depth }}"
            },
            {
              "id": "e6b1d194-49fb-4b1b-8f8c-046209ed5b4b",
              "name": "embedding",
              "type": "array",
              "value": "={{ $json.embeddings.float[0] }}"
            },
            {
              "id": "3b800637-a814-40a3-bd80-553640845302",
              "name": "annotation",
              "value": "={{ $('Edit Fields2').item.json.image_annotation }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "99f43ff4-5580-4cd0-bd57-97986ae02e39",
      "name": "Prepare Points4",
      "type": "n8n-nodes-base.set",
      "position": [
        -7728,
        1728
      ],
      "typeVersion": 3.4,
      "disabled": true
    },
    {
      "parameters": {
        "resource": "point",
        "operation": "upsertPoints",
        "collectionName": {
          "__rl": true,
          "value": "CompTIASecurity",
          "mode": "list",
          "cachedResultName": "CompTIASecurity"
        },
        "points": "={{\n$json.points.map(item => ({\n  id: item.id,\n  payload: {\n    content: item.annotation,\n    metadata: {}\n  },\n  vector: item.embedding\n})).toJsonString()\n}}",
        "wait": false,
        "requestOptions": {}
      },
      "id": "a26dc28f-9328-4eed-93b4-4734d0dc4da3",
      "name": "Insert Points",
      "type": "n8n-nodes-qdrant.qdrant",
      "position": [
        -7136,
        1728
      ],
      "typeVersion": 1,
      "disabled": true
    },
    {
      "parameters": {
        "content": "# Vector Store Setup",
        "height": 80,
        "width": 352,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8368,
        1792
      ],
      "typeVersion": 1,
      "id": "c3d8cb3d-8318-496e-9596-9e1b2559e94e",
      "name": "Sticky Note16",
      "disabled": true
    },
    {
      "parameters": {
        "operation": "deleteCollection",
        "collectionName": {
          "__rl": true,
          "value": "=CompTIASecurity",
          "mode": "name"
        },
        "requestOptions": {}
      },
      "type": "n8n-nodes-qdrant.qdrant",
      "typeVersion": 1,
      "position": [
        -8432,
        944
      ],
      "id": "1bd4ea62-9e55-4de3-a3ae-33f52433dab9",
      "name": "Delete Collection1",
      "executeOnce": false,
      "disabled": true
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 182,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7184,
        1696
      ],
      "typeVersion": 1,
      "id": "7627a454-96fb-4c95-9522-9ab146ba98cb",
      "name": "Sticky Note23",
      "disabled": true
    },
    {
      "parameters": {
        "content": "### Update Collection",
        "height": 80,
        "width": 150,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7200,
        1664
      ],
      "typeVersion": 1,
      "id": "44bcef29-10c6-4c69-b6f2-1eeb09c79de4",
      "name": "Sticky Note24",
      "disabled": true
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 182,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8480,
        912
      ],
      "typeVersion": 1,
      "id": "25dda723-08ec-4559-9e38-3898ee7ffd0e",
      "name": "Sticky Note25",
      "disabled": true
    },
    {
      "parameters": {
        "content": "### Update Collection",
        "height": 80,
        "width": 150,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8496,
        880
      ],
      "typeVersion": 1,
      "id": "a4548654-787b-4357-9fa7-bf5350ad6dc1",
      "name": "Sticky Note26",
      "disabled": true
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 182,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8112,
        912
      ],
      "typeVersion": 1,
      "id": "7edbda16-17d4-4064-99a2-a3e6037df54f",
      "name": "Sticky Note27",
      "disabled": true
    },
    {
      "parameters": {
        "content": "### Update Collection",
        "height": 80,
        "width": 150,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8128,
        880
      ],
      "typeVersion": 1,
      "id": "9c0f6934-9b41-45fa-85c1-56600a85bc15",
      "name": "Sticky Note28",
      "disabled": true
    },
    {
      "parameters": {
        "content": "",
        "width": 294,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6624,
        1168
      ],
      "typeVersion": 1,
      "id": "8cdf9e7b-3823-4b3c-895e-0d231f2064a1",
      "name": "Sticky Note39",
      "disabled": true
    },
    {
      "parameters": {
        "mode": "insert",
        "qdrantCollection": {
          "__rl": true,
          "value": "CompTIASecurity",
          "mode": "list",
          "cachedResultName": "CompTIASecurity"
        },
        "embeddingBatchSize": 96,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        -6576,
        1216
      ],
      "id": "c8e19b0d-5afe-4db7-8ee9-ceb03959d7c0",
      "name": "Qdrant Vector Store2",
      "credentials": {
        "qdrantApi": {
          "id": "f4OYPtbhAv74DCJ1",
          "name": "Qdrant API"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "content": "## Update Collection",
        "height": 80,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6624,
        1168
      ],
      "typeVersion": 1,
      "id": "fec0acdd-7aa5-40f4-acdc-9285cbed183c",
      "name": "Sticky Note40",
      "disabled": true
    },
    {
      "parameters": {
        "jsCode": "// Extract the rewritten script from the AI Agent node\nconst script = $('AI Agent').first().json.output.rewritten_script;\n\n// Get first 15 words (or first sentence if shorter)\nconst words = script.trim().split(/\\s+/);\nlet opening = '';\n\nif (words.length <= 15) {\n  // If script is very short, take it all\n  opening = script;\n} else {\n  // Take first 15 words\n  opening = words.slice(0, 15).join(' ');\n  \n  // If it doesn't end with punctuation, find the end of the sentence\n  if (!opening.match(/[.!?]$/)) {\n    // Find first sentence ending within first 25 words\n    const extendedWords = words.slice(0, 25).join(' ');\n    const sentenceMatch = extendedWords.match(/^[^.!?]+[.!?]/);\n    \n    if (sentenceMatch) {\n      opening = sentenceMatch[0];\n    } else {\n      // Just add ellipsis if no sentence end found\n      opening = opening + '...';\n    }\n  }\n}\n\n// Get the existing recent openings array from current input\nlet recentOpenings = $json.recent_openings_array || [];\n\n// Add this new opening to the start of the array\nrecentOpenings.unshift(opening);\n\n// Keep only the last 20 openings\nif (recentOpenings.length > 20) {\n  recentOpenings = recentOpenings.slice(0, 20);\n}\n\n// Pass everything forward\nreturn {\n  json: {\n    ...$json,\n    current_opening: opening,\n    updated_openings_array: recentOpenings\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -3728,
        2720
      ],
      "id": "60fa5c3d-3386-4c69-966b-ba8cc5a42e84",
      "name": "Code in JavaScript7"
    },
    {
      "parameters": {
        "operation": "get",
        "key": "={{ $('Global Constants5').first().json.constants.redis_DB1 }}",
        "keyType": "string",
        "options": {}
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        -4576,
        2736
      ],
      "id": "cd670cb0-ca09-4377-b0ab-004cf6c542bb",
      "name": "Redis",
      "credentials": {
        "redis": {
          "id": "4nD9S5LZCArxPB81",
          "name": "Redis (NO EXPIRATION)"
        }
      }
    },
    {
      "parameters": {
        "operation": "set",
        "key": "={{ $('Global Constants5').first().json.constants.redis_DB1 }}",
        "value": "={{ JSON.stringify($json.updated_openings_array) }}",
        "keyType": "string",
        "expire": true,
        "ttl": 2592000
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        -3552,
        2720
      ],
      "id": "46f8d3de-ee6e-4f0a-98ad-8b01a6a6457f",
      "name": "Redis1",
      "credentials": {
        "redis": {
          "id": "4nD9S5LZCArxPB81",
          "name": "Redis (NO EXPIRATION)"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Define all possible opening styles WITHOUT examples\nconst openingStyles = [\n  {\n    style: \"direct_statement\",\n    instruction: \"Start with a bold, clear statement of fact or assertion. Make it attention-grabbing and relevant to the lesson topic. Do NOT use questions or 'imagine' phrases.\"\n  },\n  {\n    style: \"question\",\n    instruction: \"Open with an engaging, thought-provoking question that makes the viewer curious about the topic. Avoid cliché openings like 'Have you ever' or 'What if'.\"\n  },\n  {\n    style: \"story\",\n    instruction: \"Begin with a brief narrative, anecdote, or historical moment that relates to the lesson. Use specific, vivid details to draw the viewer in.\"\n  },\n  {\n    style: \"surprising_fact\",\n    instruction: \"Lead with an unexpected, attention-grabbing statistic or truth that relates to the lesson. Make it concrete, specific, and genuinely surprising.\"\n  },\n  {\n    style: \"problem_statement\",\n    instruction: \"Present a clear problem, challenge, or limitation that the lesson will address. Frame it as a struggle or obstacle worth overcoming.\"\n  },\n  {\n    style: \"personal_address\",\n    instruction: \"Speak directly to the viewer's experience, knowledge, or situation. Connect the lesson topic to something they likely already know or have encountered.\"\n  },\n  {\n    style: \"contrast\",\n    instruction: \"Compare two different approaches, methods, eras, or concepts to highlight a key difference. Show the distinction between old and new, simple and complex, or two competing ideas.\"\n  },\n  {\n    style: \"action_oriented\",\n    instruction: \"Invite immediate engagement or exploration of the topic. Use active, dynamic language that creates momentum from the first sentence.\"\n  },\n  {\n    style: \"scenario_based\",\n    instruction: \"Start with a concrete real-world situation, use case, or application of the lesson concept. Paint a vivid picture of the context where this matters.\"\n  },\n  {\n    style: \"historical_context\",\n    instruction: \"Begin with relevant background, evolution, or the journey that led to this concept. Use temporal framing to show how ideas developed over time.\"\n  }\n];\n\n// Randomly select one style\nconst randomIndex = Math.floor(Math.random() * openingStyles.length);\nconst selectedOpening = openingStyles[randomIndex];\n\n// Get the input data\nconst inputData = items[0].json;\n\n// Add the opening style instruction to the data\nreturn [{\n  json: {\n    ...inputData,\n    opening_style: selectedOpening.style,\n    opening_instruction: selectedOpening.instruction,\n    opening_style_full_name: selectedOpening.style.replace(/_/g, ' ')\n  }\n}];\n```\n\n## Why This Is Better\n\n**Forces creativity:**\n- No templates to copy\n- AI must interpret the style freshly for each script\n- Each direct statement will be genuinely different\n- Each question will be uniquely phrased\n\n**Prevents new patterns:**\n- Can't fall back on \"Neural networks changed...\"\n- Can't reuse \"What makes X better than Y?\"\n- Must create original openings every time\n\n**Maintains variety:**\n- Style descriptions are clear enough to guide\n- Vague enough to allow infinite variations\n- AI still knows what kind of opening to create\n\n## Comparison\n\n### ❌ **With Examples (Bad):**\n```\ninstruction: \"Start with a bold statement. Example: 'Neural networks revolutionized AI in 2012.'\"\n```\n**Result:** Scripts might start with:\n- \"Deep learning revolutionized computer vision in 2015.\"\n- \"Transformers revolutionized NLP in 2017.\"\n- \"Neural networks revolutionized medicine in 2020.\"\n*Same template, just different words!*\n\n### ✅ **Without Examples (Good):**\n```\ninstruction: \"Start with a bold, clear statement of fact or assertion.\""
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -4880,
        2736
      ],
      "id": "f6586c98-f1db-4603-a42f-48f4498d78b4",
      "name": "Code in JavaScript1"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-4-5-20250929",
          "mode": "list",
          "cachedResultName": "Claude Sonnet 4.5"
        },
        "options": {
          "thinking": true
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        -4416,
        2416
      ],
      "id": "a3a1ed54-bfcd-4b5e-85e1-b4a2629ff1d5",
      "name": "Anthropic Chat Model3",
      "credentials": {
        "anthropicApi": {
          "id": "5pMiFSPZL2r44q7L",
          "name": "Anthropic Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Get the original script from the correct path\nconst originalScript = $('Get row(s) in sheet3').first().json.SCRIPT;\n\n// Count words in original script\nconst wordCount = originalScript.trim().split(/\\s+/).length;\n\n// Calculate target range (±15%)\nconst minTarget = Math.floor(wordCount * 0.85);\nconst maxTarget = Math.ceil(wordCount * 1.15);\n\n// Get the existing data and add word count info\nconst inputData = items[0].json;\n\nreturn [{\n  json: {\n    ...inputData,\n    original_script: originalScript,\n    original_word_count: wordCount,\n    min_word_count: minTarget,\n    max_word_count: maxTarget,\n    word_count_guidance: `Your rewritten script must be between ${minTarget} and ${maxTarget} words to stay within ±15% of the original ${wordCount} words. Count carefully and adjust length as needed.`\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -4720,
        2736
      ],
      "id": "e429e267-6112-439a-bc03-35d3f0eb939f",
      "name": "Code in JavaScript3"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants1').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants1').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "ID": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "Chapter Number": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "Chapter Name": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "Lesson Number": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "Lesson Name": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "SCRIPT": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "AI NOTES": "={{ $('Global Constants1').first().json.constants.Status_8 }}",
            "Rewritten Script": "={{ $('Global Constants1').first().json.constants.Status_8 }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -6688,
        2736
      ],
      "id": "50248002-6d98-432f-a9a4-babfa82cd085",
      "name": "Append row in sheet",
      "executeOnce": true,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "content": "",
        "height": 176,
        "width": 214,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6480,
        2816
      ],
      "typeVersion": 1,
      "id": "a587af3d-54e1-44e3-ba33-3e237e5dfcea",
      "name": "Sticky Note36"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "months",
              "monthsInterval": 365,
              "triggerAtDayOfMonth": 31
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -6416,
        2848
      ],
      "id": "46026493-13f8-4a12-b74b-14f044f4b600",
      "name": "Schedule Trigger4"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-globals.globalConstants",
      "typeVersion": 1,
      "position": [
        -6192,
        2736
      ],
      "id": "4b1d1ba0-86c9-48a7-a9f8-ca5de25c9661",
      "name": "Global Constants5",
      "executeOnce": true,
      "credentials": {
        "globalConstantsApi": {
          "id": "JSzJUsH8Uy5bsaoy",
          "name": "ULTIMA Online Course Creation"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "={{ $json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -6016,
        2736
      ],
      "id": "5d9c7469-0048-4257-a118-9c00b73b4811",
      "name": "Get row(s) in sheet3",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -5648,
        2720
      ],
      "id": "9ca7ed05-408d-45fd-8f6b-499450b2cef4",
      "name": "Loop Over Items2"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "8f8c4c99-24da-4f8a-8cd7-9ac68b8d8970",
              "leftValue": "={{ $json.STATUS }}",
              "rightValue": "WAITING",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -5824,
        2736
      ],
      "id": "2e328cd2-f7d6-4646-9185-13161f1edb92",
      "name": "If1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        -5552,
        2960
      ],
      "id": "014a65c9-0ef6-45dd-9b33-62ea1164bae8",
      "name": "No Operation, do nothing1"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants3').item.json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "={{ $('Global Constants3').item.json.constants.Status_2 }}",
            "M": "={{ $('Get row(s) in sheet1').item.json['Chapter Number'] - 1 }}",
            "L": "={{ $('Get row(s) in sheet1').item.json['Lesson Number'] }}",
            "S": "={{ $json.segment_number }}",
            "Lesson Title": "={{ $('Get row(s) in sheet1').item.json['Lesson Name'] }}",
            "Module Title": "={{ $('Get row(s) in sheet1').item.json['Chapter Name'] }}",
            "QC_NARRATION": "={{ $json.text }}",
            "CODE": "={{ $('Get row(s) in sheet1').item.json['Chapter Number'] - 1 }}_{{ $('Get row(s) in sheet1').item.json['Lesson Number'] }}_{{ $json.segment_number }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -1680,
        1264
      ],
      "id": "95492ddd-a7ce-4c99-8477-373b352e2cd0",
      "name": "Append row in sheet5",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants3').item.json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "={{ $('Global Constants3').item.json.constants.Status_2 }}",
            "M": "={{ $('Get row(s) in sheet1').item.json['Chapter Number'] - 1 }}",
            "L": "={{ $('Get row(s) in sheet1').item.json['Lesson Number'] }}",
            "S": "=0",
            "Lesson Title": "={{ $('Get row(s) in sheet1').item.json['Lesson Name'] }}",
            "Module Title": "={{ $('Get row(s) in sheet1').item.json['Chapter Name'] }}",
            "QC_NARRATION": "={{ $('Get row(s) in sheet1').item.json['Rewritten Script'] }}",
            "CODE": "={{ $('Get row(s) in sheet1').item.json['Chapter Number'] - 1 }}_{{ $('Get row(s) in sheet1').item.json['Lesson Number'] }}_0"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -2656,
        1280
      ],
      "id": "9ff404c5-2c15-431a-a7bf-5a2a5eeb424e",
      "name": "Append row in sheet2",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "name": "=M{{ $('Get row(s) in sheet').item.json.M }}_L{{ $('Get row(s) in sheet').item.json.L }}_S{{ $('Get row(s) in sheet').item.json.S }}.mp3",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.elevenlabs_folder_id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -2064,
        432
      ],
      "id": "a4c07a9c-3354-4636-87a8-ab4ef5fa6e1d",
      "name": "Upload file",
      "retryOnFail": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "resource": "speech",
        "voice": {
          "__rl": true,
          "value": "yzyTuzi0bVpT81ujLbCC",
          "mode": "list",
          "cachedResultName": "Personal Voice"
        },
        "text": "={{ $json.QC_NARRATION }}",
        "additionalOptions": {
          "model": {
            "mode": "list",
            "value": "eleven_multilingual_v2"
          },
          "outputFormat": "mp3_44100_128",
          "languageCode": "en",
          "voiceSettings": "{\n  \"stability\": 0.45,\n  \"similarity_boost\": 0.20,\n  \"style\": 0.55,\n  \"use_speaker_boost\": true,\n  \"speed\": 1.01\n}"
        },
        "requestOptions": {}
      },
      "type": "@elevenlabs/n8n-nodes-elevenlabs.elevenLabs",
      "typeVersion": 1,
      "position": [
        -2432,
        448
      ],
      "id": "f0ba8a71-38eb-427a-8301-635c48b9ffad",
      "name": "Convert text to speech1",
      "retryOnFail": true,
      "credentials": {
        "elevenLabsApi": {
          "id": "ZxtxWf0XpoMwKbN1",
          "name": "ElevenLabs (Nandy Bo)"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-globals.globalConstants",
      "typeVersion": 1,
      "position": [
        -3264,
        432
      ],
      "id": "3bef2a79-5d07-4f16-a756-1d76ea8e7e63",
      "name": "Global Constants4",
      "executeOnce": true,
      "credentials": {
        "globalConstantsApi": {
          "id": "JSzJUsH8Uy5bsaoy",
          "name": "ULTIMA Online Course Creation"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "={{ $json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "STATUS",
              "lookupValue": "={{ $json.constants.Status_2 }}"
            }
          ]
        },
        "combineFilters": "OR",
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -3104,
        432
      ],
      "id": "66ebc12a-258a-4dbc-bc06-e8a5eb1159df",
      "name": "Get row(s) in sheet",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "alwaysOutputData": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "months",
              "monthsInterval": 365,
              "triggerAtDayOfMonth": 31
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -3488,
        320
      ],
      "id": "bf432cd6-8a1c-4c8f-a201-f186921f0362",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "77dcf2e1-7f92-4f20-8081-e88f41d2dd4e",
              "leftValue": "={{ $json.S }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -2656,
        432
      ],
      "id": "d2109143-4ee8-44ef-8788-07d70c2ede5a",
      "name": "If"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "queryString": "Course Jingle 1 (Nandy Cyber Success)",
        "filter": {
          "folderId": {
            "__rl": true,
            "value": "={{ $('Global Constants4').item.json.constants.folder_id }}",
            "mode": "id"
          }
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -2128,
        -80
      ],
      "id": "75a25979-a988-4e03-b39e-54f8d36e32a6",
      "name": "Search files and folders",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "={{ $('Global Constants4').item.json.constants.Status_3 }}",
            "TTS OUTPUT (ID)": "={{ $json.id }}",
            "TTS OUTPUT (URL)": "=https://drive.google.com/file/d/{{ $json.id }}/view?usp=sharing"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -1680,
        -96
      ],
      "id": "9135d9a1-ef5a-437e-911d-d39454990624",
      "name": "Update row in sheet4",
      "retryOnFail": true,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.VIDEO_URL_CREATOMATE }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -816,
        -96
      ],
      "id": "6a140a46-4e0f-4fa9-9a7c-2a9e0bd30c5d",
      "name": "HTTP Request55",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"7fff0f97-7717-4032-9ff5-f87b120bea9f\",\n  \"modifications\": {\n    \"Image.source\": \"{{ $('Get row(s) in sheet').item.json['Lesson Title'] }}\",\n    \"Title.text\": \"{{ $('Get row(s) in sheet').item.json['Lesson Title'] }}\",\n    \"Label.text\": \"MODULE {{ $('Get row(s) in sheet').item.json.M }} Lesson {{ $('Get row(s) in sheet').item.json.L }}\",\n    \"CTA-VFS.text\": \"Nandy Cyber Success\",\n    \"Voiceover-TL7.source\": \"{{ $json['TTS OUTPUT (URL)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1392,
        -96
      ],
      "id": "60f2241c-363b-41f8-8803-b6b489602ae2",
      "name": "HTTP Request13",
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "name": "=M{{ $('Get row(s) in sheet').item.json.M }}_L{{ $('Get row(s) in sheet').item.json.L }}_S{{ $('Get row(s) in sheet').item.json.S }}.mp4",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.creatomate_folder_id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -640,
        -112
      ],
      "id": "3fa34069-a918-46db-a978-d7b4c4465473",
      "name": "Upload file2",
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "amount": 120
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -976,
        -96
      ],
      "id": "8b3fef58-1faf-4c90-8f2b-f4befcf6a9ee",
      "name": "Wait4",
      "webhookId": "dfa4d255-c43b-4528-984f-f8c93a5f7719"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "VIDEO_URL_CREATOMATE": "={{ $json.url }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -1184,
        -96
      ],
      "id": "8a7a81f1-f35e-46cb-8c01-5fb6dfcb7d80",
      "name": "Update row in sheet5",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "bbd950c4-ab5e-489d-b910-0510340a8997",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 1,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "890b5211-c431-453c-91a1-9d30e53c2399",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 3,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "680cdbae-e95f-42ce-9cc1-08e6d90d901f",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 5,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "251a6b9a-9992-40fe-acf2-5cf58d6670ef",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 7,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "8d3398a3-16ea-46e7-8467-cdaf8a651954",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 9,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "7091f5f3-414b-4f61-b087-d447efd61d65",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 11,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "9fbfbc7e-3211-4302-9c8e-a0db497f1669",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 13,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "df619a53-a630-4335-b606-8e59a767f317",
              "leftValue": "={{ $('Get row(s) in sheet').item.json.S }}",
              "rightValue": 15,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -1600,
        432
      ],
      "id": "9bae850f-a4c3-42b3-949d-ea2f0382a53a",
      "name": "If10"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=DO NOT UNDER ANY CIRCUMSTANCE CHOOSE LAYOUT_008 OR LAYOUT_001. Here is the script:\n\n{{ $('Get row(s) in sheet').item.json.QC_NARRATION }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=I will provide the AI Agent with a piece of text that is a narration for an education course that I'm creating. The Assistant will then use this narration to choose one of nine layouts that is most appropriate for the text in that case, depending on the context of the narration.\n\nHere are the choices:\n\nLayout_001 = This is a basic slide with title text and summary body text.\nLayout_002 = This is a creative slide with a highlighted question/query/idea and an answer/exploration/description of the highlighted question/query/idea\nLayout_003 = This is a slide that presents 3 concepts which may or may not be related.\nLayout_004 = Comprised of a big bold statement followed by supporting text\nLayout_005 = This is a slide that presents 2 bullet points or ideas\nLayout_006 = This is a slide that presents 3 bullet points or ideas \nLayout_007 = This is a slide that presents 4 bullet points or ideas\nLayout_008 = This is a slide that has title text and a brief summary passage\nLayout_009 = Comprised of a big bold statement followed by two bullet points of text text\n\nShould you feel that a specific layout is the most appropriate for the narration you’ve been provided you, you will return the chosen Layout. For example, if your choice is Layout_004, you will return in the output nothing but “Layout_004”."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.1,
      "position": [
        -1296,
        384
      ],
      "id": "07369450-b70e-4a94-9771-af3e3fedb0f4",
      "name": "AI Agent8",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"$id\": \"https://example.com/schemas/slide-layout-choice.schema.json\",\n  \"title\": \"Slide Layout Choice\",\n  \"description\": \"Return exactly one layout identifier that best fits the provided narration.\",\n  \"type\": \"string\",\n  \"enum\": [\n    \"Layout_001\",\n    \"Layout_002\",\n    \"Layout_003\",\n    \"Layout_004\",\n    \"Layout_005\",\n    \"Layout_006\",\n    \"Layout_007\",\n    \"Layout_008\",\n    \"Layout_009\"\n  ],\n  \"oneOf\": [\n    { \"const\": \"Layout_001\", \"description\": \"Basic slide with title text and summary body text.\" },\n    { \"const\": \"Layout_002\", \"description\": \"Creative slide highlighting a question/query/idea and its answer/exploration/description.\" },\n    { \"const\": \"Layout_003\", \"description\": \"Slide presenting 3 concepts which may or may not be related.\" },\n    { \"const\": \"Layout_004\", \"description\": \"Big bold statement followed by supporting text.\" },\n    { \"const\": \"Layout_005\", \"description\": \"Slide presenting 2 bullet points or ideas.\" },\n    { \"const\": \"Layout_006\", \"description\": \"Slide presenting 3 bullet points or ideas.\" },\n    { \"const\": \"Layout_007\", \"description\": \"Slide presenting 4 bullet points or ideas.\" },\n    { \"const\": \"Layout_008\", \"description\": \"Slide with title text and a brief summary passage.\" },\n    { \"const\": \"Layout_009\", \"description\": \"Big bold statement followed by two bullet points of text.\" }\n  ],\n  \"examples\": [\"Layout_004\"]\n}\n",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -1296,
        304
      ],
      "id": "2003de74-25f4-4fa1-9c99-e212b85ba4bd",
      "name": "Structured Output Parser8"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatCohere",
      "typeVersion": 1,
      "position": [
        -1104,
        304
      ],
      "id": "a32da85d-702b-4f9b-be2c-438b69bc2796",
      "name": "Cohere Chat Model4",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "Choice of Layout": "={{ $json.output }}",
            "STATUS": "={{ $('Global Constants4').item.json.constants.Status_6 }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        -736,
        624
      ],
      "id": "87591a33-8c2b-4d60-97e8-4fb963a24ee9",
      "name": "Update row in sheet80",
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "var(1)": "={{ $json.output.var_1 }}",
            "var(2)": "={{ $json.output.var_2 }}",
            "var(3)": "={{ $json.output.var_3 }}",
            "var(4)": "={{ $json.output.var_4 }}",
            "var(9)": "={{ $json.output.var_9 }}",
            "var(10)": "={{ $json.output.var_10 }}",
            "var(5)": "={{ $json.output.var_5 }}",
            "var(6)": "={{ $json.output.var_6 }}",
            "var(7)": "={{ $json.output.var_7 }}",
            "var(8)": "={{ $json.output.var_8 }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        80,
        608
      ],
      "id": "0d89e46c-bf6d-4830-95f7-6eaa3be69bd8",
      "name": "Update row in sheet86",
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "operation": "share",
        "fileId": {
          "__rl": true,
          "value": "={{ $('Update row in sheet8').item.json['TTS OUTPUT (ID)'] }}",
          "mode": "id"
        },
        "permissionsUi": {
          "permissionsValues": {
            "role": "writer",
            "type": "anyone",
            "allowFileDiscovery": true
          }
        },
        "options": {}
      },
      "id": "b3c6e71a-b92f-4ddf-a539-9c927270a40c",
      "name": "Set Access Permissions1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        256,
        608
      ],
      "typeVersion": 3,
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.VIDEO_URL_CREATOMATE }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1744,
        592
      ],
      "id": "2fc13c8d-c5aa-4f97-bf1f-bb6fcdf39052",
      "name": "HTTP Request58",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "name": "=M{{ $('Get row(s) in sheet').item.json.M }}_L{{ $('Get row(s) in sheet').item.json.L }}_S{{ $('Get row(s) in sheet').item.json.S }}.mp4",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.creatomate_folder_id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        2512,
        576
      ],
      "id": "9d840e99-39c2-4be9-a997-b8ccf1e8a3b4",
      "name": "Upload file5",
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "tIDDMV7A8FksccHm",
          "name": "Google Drive (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "amount": 120
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1568,
        592
      ],
      "id": "9217a042-4edc-45e5-b76d-a8299cd8720a",
      "name": "Wait7",
      "webhookId": "dfa4d255-c43b-4528-984f-f8c93a5f7719",
      "retryOnFail": false,
      "waitBetweenTries": 5000
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Get row(s) in sheet').item.json.QC_NARRATION }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=I will provide the AI Agent with a piece of text that is a narration for an education course that I'm creating. The Assistant will then use this narration to choose one of nine layouts that is most appropriate for the text in that case, depending on the context of the narration.\n\nHere are the choices:\n\nLayout_001 = This is a basic slide with title text and summary body text.\nLayout_002 = This is a creative slide with a highlighted question/query/idea and an answer/exploration/description of the highlighted question/query/idea\nLayout_003 = This is a slide that presents 3 concepts which may or may not be related.\nLayout_004 = Comprised of a big bold statement followed by supporting text\nLayout_005 = This is a slide that presents 2 bullet points or ideas\nLayout_006 = This is a slide that presents 3 bullet points or ideas \nLayout_007 = This is a slide that presents 4 bullet points or ideas\nLayout_008 = This is a slide that has title text and a brief summary passage\nLayout_009 = Comprised of a big bold statement followed by two bullet points of text text\n\nShould you feel that a specific layout is the most appropriate for the narration you’ve been provided you, you will return the chosen Layout. For example, if your choice is Layout_004, you will return in the output nothing but “Layout_004”."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.1,
      "position": [
        -1296,
        496
      ],
      "id": "ef8f488e-2ae8-4226-a907-20b11a928b49",
      "name": "AI Agent9",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"$id\": \"https://example.com/schemas/slide-layout-choice.schema.json\",\n  \"title\": \"Slide Layout Choice\",\n  \"description\": \"Return exactly one layout identifier that best fits the provided narration.\",\n  \"type\": \"string\",\n  \"enum\": [\n    \"Layout_001\",\n    \"Layout_002\",\n    \"Layout_003\",\n    \"Layout_004\",\n    \"Layout_005\",\n    \"Layout_006\",\n    \"Layout_007\",\n    \"Layout_008\",\n    \"Layout_009\"\n  ],\n  \"oneOf\": [\n    { \"const\": \"Layout_001\", \"description\": \"Basic slide with title text and summary body text.\" },\n    { \"const\": \"Layout_002\", \"description\": \"Creative slide highlighting a question/query/idea and its answer/exploration/description.\" },\n    { \"const\": \"Layout_003\", \"description\": \"Slide presenting 3 concepts which may or may not be related.\" },\n    { \"const\": \"Layout_004\", \"description\": \"Big bold statement followed by supporting text.\" },\n    { \"const\": \"Layout_005\", \"description\": \"Slide presenting 2 bullet points or ideas.\" },\n    { \"const\": \"Layout_006\", \"description\": \"Slide presenting 3 bullet points or ideas.\" },\n    { \"const\": \"Layout_007\", \"description\": \"Slide presenting 4 bullet points or ideas.\" },\n    { \"const\": \"Layout_008\", \"description\": \"Slide with title text and a brief summary passage.\" },\n    { \"const\": \"Layout_009\", \"description\": \"Big bold statement followed by two bullet points of text.\" }\n  ],\n  \"examples\": [\"Layout_004\"]\n}\n",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -1296,
        576
      ],
      "id": "fc00b3f7-9a92-42d7-94ac-e7c01ee0a5bc",
      "name": "Structured Output Parser2"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatCohere",
      "typeVersion": 1,
      "position": [
        -1072,
        576
      ],
      "id": "4c38c826-7cb4-49bb-8f5a-373a8e73905d",
      "name": "Cohere Chat Model1",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/d1d98c21-033a-4dfb-b96e-3f6eab06928a",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -64,
        -128
      ],
      "id": "7a799e30-ebdd-431d-8c4f-1509db44ac5c",
      "name": "HTTP Request7",
      "executeOnce": true
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=DONE",
            "VIDEO_URL_GDRIVE": "={{ $json.webContentLink }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -256,
        -128
      ],
      "id": "beade2c3-4ec5-4c03-bee9-43184e243de9",
      "name": "Update row in sheet6",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "={{ $('Global Constants4').item.json.constants.Status_3 }}",
            "TTS OUTPUT (ID)": "={{ $json.id }}",
            "TTS OUTPUT (URL)": "={{ $json.webContentLink }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -1856,
        432
      ],
      "id": "7e3d9c34-fe01-4615-9969-ab5c68c365e9",
      "name": "Update row in sheet8",
      "retryOnFail": true,
      "executeOnce": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        -1344,
        304
      ],
      "id": "f9bc6772-18eb-4446-b2df-13a85e0b8922",
      "name": "Mistral Cloud Chat Model",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        -1344,
        576
      ],
      "id": "34f498ba-ef5c-4a2c-a3ab-863d6a961312",
      "name": "Mistral Cloud Chat Model4",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\nreturn { randomString: result };"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -560,
        624
      ],
      "id": "95ed7c6e-baca-46b4-9a12-7692d7a8c96b",
      "name": "Code in JavaScript8"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Choice of Layout: {{ $('Update row in sheet80').item.json['Choice of Layout'] }}\n\nNarration:\n{{ $('Get row(s) in sheet').item.json.QC_NARRATION }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=## Core Identity & Mission\n\nYou are a specialized AI content generator for cybersecurity certification training materials. Your role is to transform instructor narration into structured, slide-ready content for professional Udemy courses. You maintain the educational integrity of the source material while optimizing it for visual presentation and learner comprehension.\n\n## Input Structure\n\nEach request contains:\n1. **Narration**: Instructor's educational content (spoken format)\n2. **Layout Identifier**: Specific template code (Layout_001 through Layout_009)\n\n## Output Requirements\n\n### Structural Rules\n- **Always output exactly 10 variables** (`var_1` through `var_10`)\n- **Never alter the variable count or sequence**\n- **Unused variables must be empty strings** (`\"\"`)\n- **No markdown, delimiters, or special formatting** in values\n- **Output must be automation-ready** for direct Google Sheets integration via n8n\n\n### Content Quality Standards\n- **Tone**: Professional, authoritative, exam-focused\n- **Audience**: Cybersecurity professionals preparing for certification exams\n- **Style**: Clear, concise, actionable\n- **Accuracy**: Maintain technical precision from source narration\n- **Conciseness**: Respect all word count limits strictly\n\n### Image Prompt Guidelines\nWhen generating AI image prompts:\n- **Style**: Professional, modern, corporate aesthetic\n- **Relevance**: Directly supports the educational concept\n- **Specificity**: Include concrete visual elements (e.g., \"dashboard with security metrics\" not \"security concept\")\n- **Tone**: Professional workplace setting, avoid stock photo clichés\n- **Technical accuracy**: Use correct terminology and visual metaphors\n\n### Content Extraction Strategy\n1. Identify the core concept from narration\n2. Extract key technical terms and frameworks\n3. Distill into layout-appropriate chunks\n4. Ensure logical flow across variables\n5. Maintain exam-relevant emphasis\n\n## Layout Specifications\n\n### Layout_001: Simple Title + Body\n**Use case**: Concept introduction, definitions, transitions\n- `var_1`: **Title** (6–10 words) — Clear, specific concept name\n- `var_2`: **Body** (40–60 words) — Comprehensive explanation\n- `var_3` to `var_10`: `\"\"`\n\n### Layout_002: Visual Concept Introduction\n**Use case**: Thought-provoking questions, scenario setup\n- `var_1`: **AI image prompt** — Background visual setting the context\n- `var_2`: **Key question or idea** (6–8 words) — Attention-grabbing\n- `var_3`: **Supporting phrase** (≤8 words) — Clarifying context\n- `var_4`: **Context paragraph** (20–30 words) — Detailed explanation\n- `var_5` to `var_10`: `\"\"`\n\n### Layout_003: Three-Column Visual Breakdown\n**Use case**: Process steps, comparison of concepts, sequential learning\n- `var_1`: **Title** (6–10 words)\n- `var_2`: **Image prompt for column 1** (supports var_3 + var_4)\n- `var_3`: **Paragraph 1** (≤12 words) — Descriptive text\n- `var_4`: **Core idea 1** (≤6 words) — Key takeaway\n- `var_5`: **Image prompt for column 2** (supports var_6 + var_7)\n- `var_6`: **Paragraph 2** (≤12 words)\n- `var_7`: **Core idea 2** (≤6 words)\n- `var_8`: **Image prompt for column 3** (supports var_9 + var_10)\n- `var_9`: **Paragraph 3** (≤12 words)\n- `var_10`: **Core idea 3** (≤6 words)\n\n### Layout_004: Concise Title + Brief Body\n**Use case**: Quick facts, short definitions, transition slides\n- `var_1`: **Title** (6–8 words)\n- `var_2`: **Body** (≈20 words) — Brief explanation\n- `var_3` to `var_10`: `\"\"`\n\n### Layout_005: Visual + Two Key Points\n**Use case**: Highlighting two critical concepts with visual support\n- `var_1`: **AI image prompt** — Background visual\n- `var_2`: **Bullet point 1** (≤10 words) — First key concept\n- `var_3`: **Bullet point 2** (≤10 words) — Second key concept\n- `var_4` to `var_10`: `\"\"`\n\n### Layout_006: Title + Three Icon Bullets\n**Use case**: Feature lists, benefit breakdowns, three-part concepts\n- `var_1`: **Title** (6–10 words)\n- `var_2`: **Image prompt for bullet 1** — Icon/visual for var_5\n- `var_3`: **Image prompt for bullet 2** — Icon/visual for var_6\n- `var_4`: **Image prompt for bullet 3** — Icon/visual for var_7\n- `var_5`: **Bullet 1** (≤8 words)\n- `var_6`: **Bullet 2** (≤8 words)\n- `var_7`: **Bullet 3** (≤8 words)\n- `var_8` to `var_10`: `\"\"`\n\n### Layout_007: Four Short Bullets with Background\n**Use case**: Quick lists, enumerated items, rapid-fire concepts\n- `var_1`: **AI image prompt** — Background visual\n- `var_2`: **Bullet 1** (≤6 words)\n- `var_3`: **Bullet 2** (≤6 words)\n- `var_4`: **Bullet 3** (≤6 words)\n- `var_5`: **Bullet 4** (≤6 words)\n- `var_6` to `var_10`: `\"\"`\n\n### Layout_008: Title + Body + Background Image\n**Use case**: Visually supported explanations\n- `var_1`: **Title** (6–8 words)\n- `var_2`: **Body** (≈20 words)\n- `var_3`: **AI image prompt** — Background visual\n- `var_4` to `var_10`: `\"\"`\n\n### Layout_009: Title + Two Bullets (No Image)\n**Use case**: Simple lists, clean text-focused slides\n- `var_1`: **Title** (6–8 words)\n- `var_2`: **Bullet point 1** (≤10 words)\n- `var_3`: **Bullet point 2** (≤10 words)\n- `var_4` to `var_10`: `\"\"`\n\n## Critical Reminders\n\n- **Word limits are strict requirements**, not suggestions\n- **Empty variables must be `\"\"`**, never null or omitted\n- **Preserve technical accuracy** from the source narration\n- **No conversational artifacts** (e.g., \"um,\" \"you know,\" filler words)\n- **No instructional language** (e.g., \"students will learn\")\n- **Direct, declarative statements** only"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.1,
      "position": [
        -320,
        624
      ],
      "id": "deeb7eec-22cd-44ba-9c12-bd9e56bcdb2a",
      "name": "AI Agent6",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"CybersecuritySlideContent\",\n  \"description\": \"Structured slide content for cybersecurity certification training courses\",\n  \"type\": \"object\",\n  \"required\": [\n    \"layout_id\",\n    \"var_1\",\n    \"var_2\",\n    \"var_3\",\n    \"var_4\",\n    \"var_5\",\n    \"var_6\",\n    \"var_7\",\n    \"var_8\",\n    \"var_9\",\n    \"var_10\"\n  ],\n  \"properties\": {\n    \"layout_id\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"Layout_001\",\n        \"Layout_002\",\n        \"Layout_003\",\n        \"Layout_004\",\n        \"Layout_005\",\n        \"Layout_006\",\n        \"Layout_007\",\n        \"Layout_008\",\n        \"Layout_009\"\n      ],\n      \"description\": \"The layout template identifier used for this slide\"\n    },\n    \"var_1\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 1\"\n    },\n    \"var_2\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 2\"\n    },\n    \"var_3\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 3\"\n    },\n    \"var_4\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 4\"\n    },\n    \"var_5\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 5\"\n    },\n    \"var_6\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 6\"\n    },\n    \"var_7\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 7\"\n    },\n    \"var_8\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 8\"\n    },\n    \"var_9\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 9\"\n    },\n    \"var_10\": {\n      \"type\": \"string\",\n      \"description\": \"Layout-specific content for variable 10\"\n    },\n    \"metadata\": {\n      \"type\": \"object\",\n      \"description\": \"Optional metadata for tracking and quality assurance\",\n      \"properties\": {\n        \"slide_number\": {\n          \"type\": \"integer\",\n          \"description\": \"Sequential slide number in the course\"\n        },\n        \"section_title\": {\n          \"type\": \"string\",\n          \"description\": \"The course section this slide belongs to\"\n        },\n        \"word_counts\": {\n          \"type\": \"object\",\n          \"description\": \"Word count validation for each variable\",\n          \"properties\": {\n            \"var_1_count\": {\"type\": \"integer\"},\n            \"var_2_count\": {\"type\": \"integer\"},\n            \"var_3_count\": {\"type\": \"integer\"},\n            \"var_4_count\": {\"type\": \"integer\"},\n            \"var_5_count\": {\"type\": \"integer\"},\n            \"var_6_count\": {\"type\": \"integer\"},\n            \"var_7_count\": {\"type\": \"integer\"},\n            \"var_8_count\": {\"type\": \"integer\"},\n            \"var_9_count\": {\"type\": \"integer\"},\n            \"var_10_count\": {\"type\": \"integer\"}\n          }\n        },\n        \"source_narration_length\": {\n          \"type\": \"integer\",\n          \"description\": \"Character count of original narration\"\n        },\n        \"generated_timestamp\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\",\n          \"description\": \"ISO 8601 timestamp of generation\"\n        }\n      }\n    }\n  },\n  \"additionalProperties\": false\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -256,
        736
      ],
      "id": "c028d9d1-54c7-4474-bf98-6d49b9727d7c",
      "name": "Structured Output Parser10"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.randomString }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "typeVersion": 1.5,
      "position": [
        -272,
        464
      ],
      "id": "d70e2df4-00af-4f68-8022-dac67de3faa0",
      "name": "Redis Chat Memory2",
      "credentials": {
        "redis": {
          "id": "4nD9S5LZCArxPB81",
          "name": "Redis (NO EXPIRATION)"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -256,
        848
      ],
      "id": "e93672c9-213c-40d8-9b67-f59a93a99441",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": "mistral-large-latest",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "typeVersion": 1,
      "position": [
        -416,
        784
      ],
      "id": "54a31395-ee0d-4c27-b8ce-2d5f665fac50",
      "name": "Mistral Cloud Chat Model5",
      "credentials": {
        "mistralCloudApi": {
          "id": "feG0p0tu1GwMlA1h",
          "name": "Mistral Cloud Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=DONE",
            "VIDEO_URL_GDRIVE": "={{ $json.webContentLink }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        2720,
        576
      ],
      "id": "4aca1534-0070-4645-88fc-dbbe7d58bcfb",
      "name": "Update row in sheet9",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants3').first().json.constants.Sheet_1 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "={{ $('Global Constants3').first().json.constants.Status_10 }}",
            "row_number": "={{ $('Get row(s) in sheet1').first().json.row_number }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Chapter Number",
              "displayName": "Chapter Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Chapter Name",
              "displayName": "Chapter Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Number",
              "displayName": "Lesson Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Name",
              "displayName": "Lesson Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SCRIPT",
              "displayName": "SCRIPT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "AI NOTES",
              "displayName": "AI NOTES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Rewritten Script",
              "displayName": "Rewritten Script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -3312,
        1840
      ],
      "id": "d8ac3525-6b5a-4726-8a7d-c979d1c01c1b",
      "name": "Update row in sheet11",
      "retryOnFail": true,
      "executeOnce": false,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "ffff",
        "subject": "ffff",
        "message": "ffff",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -4048,
        1120
      ],
      "id": "2748b798-be86-43c0-90bb-ff751b92880f",
      "name": "Send a message",
      "webhookId": "9737ce6d-1b06-4bed-8c65-0eb52e8fd360",
      "credentials": {
        "gmailOAuth2": {
          "id": "Vn1zFRIxiwOZxM5S",
          "name": "Admin Gmail Account"
        }
      }
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -3104,
        1840
      ],
      "id": "13e82938-fc7e-44f6-822c-abdd8c834733",
      "name": "Wait6",
      "webhookId": "c5c4ac51-a700-4196-b655-df3d71140d34",
      "executeOnce": true
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/03b6c9f8-f831-4266-864d-aeb3d5a97bd1",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -2944,
        1840
      ],
      "id": "cc1e9ac3-0200-48b3-9fb4-0f9964eda51c",
      "name": "HTTP Request5",
      "executeOnce": true
    },
    {
      "parameters": {
        "content": "",
        "height": 1088,
        "width": 2640,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8560,
        864
      ],
      "typeVersion": 1,
      "id": "bdc9143c-ac22-4fd9-9208-636678b79472",
      "name": "Sticky Note15",
      "disabled": true
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/d1d98c21-033a-4dfb-b96e-3f6eab06928a",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2880,
        576
      ],
      "id": "ddd43311-2130-4175-8ef5-58d24e5f77c9",
      "name": "HTTP Request8",
      "executeOnce": true
    },
    {
      "parameters": {
        "path": "d1d98c21-033a-4dfb-b96e-3f6eab06928a",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -3488,
        544
      ],
      "id": "e4c80610-fe89-4985-9ce5-cd1efc552adc",
      "name": "Webhook2",
      "webhookId": "d1d98c21-033a-4dfb-b96e-3f6eab06928a"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=ERROR"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -2016,
        736
      ],
      "id": "c3d68054-888d-4eac-ac97-0905782c9ba0",
      "name": "Update row in sheet12",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -1728,
        736
      ],
      "id": "3f72016d-7c98-4160-85e3-dd7f665319f5",
      "name": "Wait9",
      "webhookId": "c5c4ac51-a700-4196-b655-df3d71140d34",
      "executeOnce": true
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/d1d98c21-033a-4dfb-b96e-3f6eab06928a",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1584,
        736
      ],
      "id": "40f86fa4-a7ab-49ab-9a82-8bf2010765a3",
      "name": "HTTP Request14",
      "executeOnce": true
    },
    {
      "parameters": {
        "content": "",
        "width": 352,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -144
      ],
      "typeVersion": 1,
      "id": "e9efb9b8-0b15-462c-9f04-ed90cc43215b",
      "name": "Sticky Note8"
    },
    {
      "parameters": {
        "content": "",
        "height": 192,
        "width": 640,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2064,
        704
      ],
      "typeVersion": 1,
      "id": "1ac7830e-8b12-4c57-b607-9f8d72eb3e77",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "operation": "sendAndWait",
        "sendTo": "gmailsendern8n.reflex734@passmail.net",
        "subject": "=WORKFLOW ERROR",
        "message": "=WORKFLOW ERROR",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -1872,
        736
      ],
      "id": "768ae6f8-ce49-4a78-8e53-ddad12fd6d7e",
      "name": "Send message and wait for response",
      "webhookId": "341a921a-6a5d-4506-9ab5-6f4c54073fc9",
      "credentials": {
        "gmailOAuth2": {
          "id": "Vn1zFRIxiwOZxM5S",
          "name": "Admin Gmail Account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=ERROR"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        112,
        160
      ],
      "id": "f04bda44-d976-4595-8936-2aae4c4e6a56",
      "name": "Update row in sheet13",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/d1d98c21-033a-4dfb-b96e-3f6eab06928a",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        320,
        160
      ],
      "id": "aa5fd44b-c852-450c-b81f-5e2123d50be5",
      "name": "HTTP Request15",
      "executeOnce": true
    },
    {
      "parameters": {
        "content": "",
        "height": 192,
        "width": 416,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        128
      ],
      "typeVersion": 1,
      "id": "5b8d5aa4-ca95-4bba-b28f-59b4ee6e21ab",
      "name": "Sticky Note9"
    },
    {
      "parameters": {
        "operation": "sendAndWait",
        "sendTo": "gmailsendern8n.reflex734@passmail.net",
        "subject": "=WORKFLOW ERROR",
        "message": "=WORKFLOW ERROR",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        272,
        -32
      ],
      "id": "3b9a652d-e23a-4240-8983-d67495c402ad",
      "name": "Send message and wait for response1",
      "webhookId": "341a921a-6a5d-4506-9ab5-6f4c54073fc9",
      "credentials": {
        "gmailOAuth2": {
          "id": "Vn1zFRIxiwOZxM5S",
          "name": "Admin Gmail Account"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "content": "",
        "width": 384,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        560
      ],
      "typeVersion": 1,
      "id": "14154ab6-adf4-41e9-ae6f-be2797ede194",
      "name": "Sticky Note10"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').first().json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=ERROR"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        2736,
        768
      ],
      "id": "15ae9814-4d54-4eab-8b72-39096fb01980",
      "name": "Update row in sheet14",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "url": "=http://localhost:5678/webhook/d1d98c21-033a-4dfb-b96e-3f6eab06928a",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2880,
        768
      ],
      "id": "92be28c2-6f8c-482e-bffc-ddc84abd193e",
      "name": "HTTP Request16",
      "executeOnce": true
    },
    {
      "parameters": {
        "amount": 120
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1984,
        752
      ],
      "id": "be347ef7-16e0-4756-b857-0160cf839db3",
      "name": "Wait10",
      "webhookId": "dfa4d255-c43b-4528-984f-f8c93a5f7719",
      "retryOnFail": false,
      "waitBetweenTries": 5000
    },
    {
      "parameters": {
        "content": "",
        "width": 384,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        752
      ],
      "typeVersion": 1,
      "id": "a3043184-7c3a-4406-9dd9-cf200d8d9b7b",
      "name": "Sticky Note11"
    },
    {
      "parameters": {
        "url": "={{ $json.VIDEO_URL_CREATOMATE }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2144,
        752
      ],
      "id": "ef06efaa-3885-45cc-9f04-869712971ff2",
      "name": "HTTP Request59",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_001",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "1a1c0e44-5e78-4e21-b7cd-9899237c7354"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 1"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "e1c69271-c30c-44e1-b9db-042b02c2a7db",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_002",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 2"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f810c111-f7fa-4e1e-a168-dd1353fec444",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_003",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 3"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "4cdf8398-eb9e-41fc-bc26-21f8381444f9",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_004",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 4"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "3bd5624f-58c9-4068-91a2-a70fc5f8fd77",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_005",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 5"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "8d4fe343-4a9d-422f-9d92-5b9e931e244f",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_006",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 6"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "132ba539-374d-49c2-ba6e-265ec76e945d",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_007",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 7"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "71aace87-0dfc-4617-8084-c8a9523aa8b6",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_008",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 8"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "5c277c73-5208-4e4c-8922-41709e926045",
                    "leftValue": "={{ $('Update row in sheet80').item.json['Choice of Layout'] }}",
                    "rightValue": "Layout_009",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Layout 9"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        480,
        496
      ],
      "id": "be64f4c4-96b6-4996-b8b6-b319ebb049cb",
      "name": "Switch3"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"df0574fc-8d9f-4a25-a4c6-3f7984ad0436\",\n  \"modifications\": {\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\",\n    \"Heading-1.text\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Text-1.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Image-1.source\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        864,
        736
      ],
      "id": "944a074d-f349-49fc-a3d9-8e1fdc6c80d5",
      "name": "HTTP Request1",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.sheet_id }}",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "={{ $('Global Constants4').item.json.constants.Sheet_3 }}",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "VIDEO_URL_CREATOMATE": "={{ $json.url }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CODE",
              "displayName": "CODE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "M",
              "displayName": "M",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "L",
              "displayName": "L",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "S",
              "displayName": "S",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Module Title",
              "displayName": "Module Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Title",
              "displayName": "Lesson Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Lesson Outline",
              "displayName": "Lesson Outline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "OBJECTIVES",
              "displayName": "OBJECTIVES",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "QC_NARRATION",
              "displayName": "QC_NARRATION",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (URL)",
              "displayName": "TTS OUTPUT (URL)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TTS OUTPUT (ID)",
              "displayName": "TTS OUTPUT (ID)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Choice of Layout",
              "displayName": "Choice of Layout",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(1)",
              "displayName": "var(1)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(2)",
              "displayName": "var(2)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(3)",
              "displayName": "var(3)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(4)",
              "displayName": "var(4)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(5)",
              "displayName": "var(5)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(6)",
              "displayName": "var(6)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(7)",
              "displayName": "var(7)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(8)",
              "displayName": "var(8)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(9)",
              "displayName": "var(9)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "var(10)",
              "displayName": "var(10)",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "VIDEO_URL_CREATOMATE",
              "displayName": "VIDEO_URL_CREATOMATE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "VIDEO_URL_GDRIVE",
              "displayName": "VIDEO_URL_GDRIVE",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        1360,
        592
      ],
      "id": "5291f482-023c-46fb-9cfb-0443ee7653fa",
      "name": "Update row in sheet75",
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000,
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wZJh4ACm1MD5wdQ9",
          "name": "Google Sheet (Admin Account - Nandy Cyber Success)"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"536fc610-6413-44b1-87a5-a568f85adac9\",\n  \"modifications\": {\n    \"Voiceover-FD4.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\",\n    \"Message-XTS.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Title-6WN.text\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        704,
        432
      ],
      "id": "22518e5f-4844-4fc2-970a-a5b908681178",
      "name": "HTTP Request31",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"0039b783-79d8-4313-a21e-d248f72baa38\",\n  \"modifications\": {\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\",\n    \"Background-Image.source\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Search-Keywords.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Result-Title.text\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\",\n    \"Result-Text.text\": \"{{ $('Update row in sheet86').item.json['var(4)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        864,
        432
      ],
      "id": "8d5cefd8-6b64-42b6-9f30-57ffa5723133",
      "name": "HTTP Request32",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"49a578b5-94c1-4a9b-9fbb-f02e3dccf23e\",\n  \"modifications\": {\n    \"Quote.text\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Name.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\",\n    \"Name-KQN.text\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1024,
        736
      ],
      "id": "51ea15d6-5c27-41c4-9730-1162ab3d56c6",
      "name": "HTTP Request33",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"1efc28fd-2cbd-4156-9100-7e23bed6c943\",\n  \"modifications\": {\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\",\n    \"Image-Z9S.source\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Message.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Message-HQQ.text\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\",\n    \"Message-V46.text\": \"{{ $('Update row in sheet86').item.json['var(4)'] }}\",\n    \"Message-SN3.text\": \"{{ $('Update row in sheet86').item.json['var(5)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        704,
        736
      ],
      "id": "790e5f28-bd89-490f-9f02-54e4dfb8791b",
      "name": "HTTP Request34",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"8a12a564-641c-4687-a1f7-7a5e67a9f4e9\",\n  \"modifications\": {\n    \"Title.text\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Image-6LQ.source\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Image-C8M.source\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\",\n    \"Image-PMD.source\": \"{{ $('Update row in sheet86').item.json['var(4)'] }}\",\n    \"Message.text\": \"{{ $('Update row in sheet86').item.json['var(5)'] }}\",\n    \"Message-ZD9.text\": \"{{ $('Update row in sheet86').item.json['var(6)'] }}\",\n    \"Message-9ZF.text\": \"{{ $('Update row in sheet86').item.json['var(7)'] }}\",\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1024,
        592
      ],
      "id": "55e11965-e893-4f7e-941d-d670063ba274",
      "name": "HTTP Request35",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"953b5b7d-c871-4919-958c-cee0030b576f\",\n  \"modifications\": {\n    \"Image-B4C.source\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Text-C9X.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Text-CST.text\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\",\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        864,
        592
      ],
      "id": "5b06ec4d-d55f-4a04-ba84-bdc1415ba970",
      "name": "HTTP Request36",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"79dfcce2-c40f-46d5-acc9-28482cd318fb\",\n  \"modifications\": {\n    \"Quote.text\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Name.text\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        704,
        592
      ],
      "id": "473b16df-dbad-459a-bacd-e1b143db73bb",
      "name": "HTTP Request37",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.creatomate.com/v2/renders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"template_id\": \"d8f3b080-3904-42e0-a449-4c5a95dc0252\",\n  \"modifications\": {\n    \"Voiceover-TL7.source\": \"{{ $('Update row in sheet8').item.json['TTS OUTPUT (URL)'] }}\",\n    \"Title.text\": \"{{ $('Update row in sheet86').item.json['var(1)'] }}\",\n    \"Product-Image-CZP.source\": \"{{ $('Update row in sheet86').item.json['var(2)'] }}\",\n    \"Product-Description-S88.text\": \"{{ $('Update row in sheet86').item.json['var(3)'] }}\",\n    \"Caption-89Q.text\": \"{{ $('Update row in sheet86').item.json['var(4)'] }}\",\n    \"Product-Image-N4Z.source\": \"{{ $('Update row in sheet86').item.json['var(5)'] }}\",\n    \"Product-Description-37X.text\": \"{{ $('Update row in sheet86').item.json['var(6)'] }}\",\n    \"Caption-P72.text\": \"{{ $('Update row in sheet86').item.json['var(7)'] }}\",\n    \"Product-Image-2CK.source\": \"{{ $('Update row in sheet86').item.json['var(8)'] }}\",\n    \"Product-Description-6VT.text\": \"{{ $('Update row in sheet86').item.json['var(9)'] }}\",\n    \"Caption-QSF.text\": \"{{ $('Update row in sheet86').item.json['var(10)'] }}\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1024,
        432
      ],
      "id": "9e263491-6cee-4337-baa1-2de1fe015ef0",
      "name": "HTTP Request38",
      "retryOnFail": true,
      "credentials": {
        "httpHeaderAuth": {
          "id": "VOfIR0v33YsFBe5U",
          "name": "Creatomate Authentication"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Create folder": {
      "main": [
        [
          {
            "node": "Copy file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folder1": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folder2": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Create folder3": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Copy file": {
      "main": [
        [
          {
            "node": "Create folder1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create folder2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create folder3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create folder4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folder4": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Send message and wait for response4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message and wait for response4": {
      "main": [
        [
          {
            "node": "Global Constants1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Global Constants",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global Constants": {
      "main": [
        [
          {
            "node": "Create folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders1": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search files and folders2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders2": {
      "main": [
        [
          {
            "node": "Sort1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort1": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Append row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract text from Binary File": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract text from Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Update row in sheet1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Brave Search": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet1": {
      "main": [
        [
          {
            "node": "Code in JavaScript7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Global Constants1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global Constants1": {
      "main": [
        [
          {
            "node": "Search files and folders1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet2": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global Constants3": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger3": {
      "main": [
        [
          {
            "node": "Global Constants3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent4": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model6": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser4": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory2": {
      "ai_memory": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent5": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model8": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser5",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser5": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript5": {
      "main": [
        [
          {
            "node": "AI Agent5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript6": {
      "main": [
        [
          {
            "node": "AI Agent4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Append row in sheet2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet7": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "Global Constants3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Append row in sheet5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "HTTP Request4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "HTTP Request9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request9": {
      "main": [
        [
          {
            "node": "HTTP Request10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request10": {
      "main": [
        [
          {
            "node": "HTTP Request11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request11": {
      "main": [
        [
          {
            "node": "Split Out5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out5": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Edit Fields3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out6": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Convert to File2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File2": {
      "main": [
        [
          {
            "node": "Image Embeddings with Cohere Embed 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Embeddings with Cohere Embed 5": {
      "main": [
        [
          {
            "node": "Prepare Points4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields3": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere4": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader2": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store2",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter2": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader2",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Points2": {
      "main": [
        [
          {
            "node": "Insert Points",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Points4": {
      "main": [
        [
          {
            "node": "Aggregate Points2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert Points": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Delete Collection1": {
      "main": [
        [
          {
            "node": "Create collection3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store2": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript7": {
      "main": [
        [
          {
            "node": "Redis1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "Redis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Global Constants5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger4": {
      "main": [
        [
          {
            "node": "Global Constants5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global Constants5": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet3": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items2": {
      "main": [
        [
          {
            "node": "Global Constants3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Loop Over Items2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet5": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet2": {
      "main": [
        [
          {
            "node": "Code in JavaScript6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Update row in sheet8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert text to speech1": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global Constants4": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Global Constants4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convert text to speech1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Update row in sheet4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet4": {
      "main": [
        [
          {
            "node": "HTTP Request13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request55": {
      "main": [
        [
          {
            "node": "Upload file2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request13": {
      "main": [
        [
          {
            "node": "Update row in sheet5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file2": {
      "main": [
        [
          {
            "node": "Update row in sheet6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "HTTP Request55",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet5": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If10": {
      "main": [
        [
          {
            "node": "AI Agent8",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent8": {
      "main": [
        [
          {
            "node": "Update row in sheet80",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser8": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent8",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Cohere Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser8",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet80": {
      "main": [
        [
          {
            "node": "Code in JavaScript8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet86": {
      "main": [
        [
          {
            "node": "Set Access Permissions1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Access Permissions1": {
      "main": [
        [
          {
            "node": "Switch3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request58": {
      "main": [
        [
          {
            "node": "Upload file5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file5": {
      "main": [
        [
          {
            "node": "Update row in sheet9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait7": {
      "main": [
        [
          {
            "node": "HTTP Request58",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent9": {
      "main": [
        [
          {
            "node": "Update row in sheet80",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent9",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Cohere Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet6": {
      "main": [
        [
          {
            "node": "HTTP Request7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet8": {
      "main": [
        [
          {
            "node": "If10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent8",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent9",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript8": {
      "main": [
        [
          {
            "node": "AI Agent6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent6": {
      "main": [
        [
          {
            "node": "Update row in sheet86",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser10": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent6",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Redis Chat Memory2": {
      "ai_memory": [
        [
          {
            "node": "AI Agent6",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser10",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent6",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet9": {
      "main": [
        [
          {
            "node": "HTTP Request8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet11": {
      "main": [
        [
          {
            "node": "Wait6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Global Constants4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait6": {
      "main": [
        [
          {
            "node": "HTTP Request5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook2": {
      "main": [
        [
          {
            "node": "Global Constants4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet12": {
      "main": [
        [
          {
            "node": "Send message and wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait9": {
      "main": [
        [
          {
            "node": "HTTP Request14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message and wait for response": {
      "main": [
        [
          {
            "node": "Wait9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet13": {
      "main": [
        [
          {
            "node": "HTTP Request15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet14": {
      "main": [
        [
          {
            "node": "HTTP Request16",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait10": {
      "main": [
        [
          {
            "node": "HTTP Request59",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request59": {
      "main": [
        [
          {
            "node": "Upload file5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch3": {
      "main": [
        [
          {
            "node": "HTTP Request31",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request32",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request38",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request37",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request36",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request35",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request34",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request33",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet75": {
      "main": [
        [
          {
            "node": "Wait7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request31": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request32": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request33": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request34": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request35": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request36": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request37": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request38": {
      "main": [
        [
          {
            "node": "Update row in sheet75",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "6cb9cd1b-328e-4ffc-aba1-8d3450ceca34",
  "meta": {
    "instanceId": "5ff5a5992c4c72af22abbdcfa574d8cdf93dc14d57eb9f66e3d9ef2a3e2dbb6c"
  },
  "id": "UFI1mG6DmMT2h6H7",
  "tags": []
}