{
  "name": "Go From Reddit Post To Scripted YouTube Video",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -496,
        224
      ],
      "id": "7211e8f6-97c2-4727-bf91-e28d70d61330",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "818f807d-fab7-4954-af1c-a8a5f7f0567f",
              "name": "keyword_search_term_1",
              "value": "freelancing",
              "type": "string"
            },
            {
              "id": "95d8bf83-2373-45a3-aba7-1c635536087c",
              "name": "keyword_search_term_2",
              "value": "upwork",
              "type": "string"
            },
            {
              "id": "dc4b6bce-fb7a-4579-953b-21646235d65f",
              "name": "keyword_search_term_3",
              "value": "cybersecurity",
              "type": "string"
            },
            {
              "id": "67a58697-2700-4f74-824a-93f1f17e50d3",
              "name": "country",
              "value": "us",
              "type": "string"
            },
            {
              "id": "825c71ab-a58a-4b67-92b9-797a72e661d1",
              "name": "current_date(mm/dd/yyyy)",
              "value": "09/15/2025",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -288,
        224
      ],
      "id": "0353a0fc-ecca-4310-b50f-29b3a3a0693b",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "operation": "search",
        "location": "allReddit",
        "keyword": "={{ $json.keyword_search_term_1 }}",
        "limit": 25,
        "additionalFields": {
          "sort": "hot"
        }
      },
      "type": "n8n-nodes-base.reddit",
      "typeVersion": 1,
      "position": [
        -96,
        224
      ],
      "id": "f063339b-9cd5-4858-82a2-21845b82e87a",
      "name": "Search for a post"
    },
    {
      "parameters": {
        "operation": "youtube",
        "search_query": "={{ $json.keyword_search_term_1 }}",
        "additionalFields": {
          "gl": "us",
          "hl": "en",
          "no_cache": true
        },
        "requestOptions": {}
      },
      "type": "n8n-nodes-serpapi.serpApi",
      "typeVersion": 1,
      "position": [
        -1088,
        64
      ],
      "id": "4f893bfa-b149-4f60-a60e-2bca3757dc7f",
      "name": "Youtube search",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "operation": "google_trends_trending_now",
        "additionalFields": {
          "category_id": "9",
          "hl": "en",
          "cat": "b",
          "no_cache": true
        },
        "requestOptions": {}
      },
      "type": "n8n-nodes-serpapi.serpApi",
      "typeVersion": 1,
      "position": [
        -1104,
        384
      ],
      "id": "b800e1b9-a015-4f25-9e42-64a9bbeaf5ad",
      "name": "Google_trends_trending_now search",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "q": "={{ $json.keyword_search_term_1 }}",
        "location": "9067609",
        "additionalFields": {
          "uule": "9067609",
          "google_domain": "google.com",
          "gl": "us",
          "hl": "en",
          "as_epq": "={{ $json.keyword_search_term_1 }}",
          "as_eq": "",
          "as_lq": "",
          "as_oq": "",
          "as_q": "",
          "as_qdr": "as_qdr=y",
          "as_rq": "",
          "as_sitesearch": "",
          "safe": "active",
          "nfpr": true,
          "filter": true,
          "tbm": "isch",
          "start": "",
          "num": "10",
          "device": "desktop",
          "no_cache": true
        },
        "requestOptions": {}
      },
      "type": "n8n-nodes-serpapi.serpApi",
      "typeVersion": 1,
      "position": [
        -1088,
        224
      ],
      "id": "047b0800-12ea-43d6-9384-30c3aa69c176",
      "name": "Google search",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "operation": "google_videos",
        "q": "={{ $json.keyword_search_term_1 }}",
        "additionalFields": {},
        "requestOptions": {}
      },
      "type": "n8n-nodes-serpapi.serpApi",
      "typeVersion": 1,
      "position": [
        -1104,
        560
      ],
      "id": "3b676f7b-1e8b-44a4-a67b-e61b3406833e",
      "name": "Google_videos search",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reddit Post Search",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "subreddit": "={{ $json.subreddit }}",
            "title": "={{ $json.title }}",
            "selftext": "={{ $json.selftext }}",
            "author_fullname": "={{ $json.author_fullname }}",
            "upvote ratio": "={{ $json.upvote_ratio }}",
            "upvotes": "={{ $json.ups }}",
            "comment number": "={{ $json.num_comments }}",
            "permalink": "={{ $json.url }}",
            "STATUS": "PENDING",
            "DATEVALUE_CURRENT": "==TODAY()",
            "DATEVALUE_POST": "==TEXT(DATE(1970,1,1) + {{ $json.created }}/86400, \"mm/dd/yyyy\")",
            "keyword": "={{ $('Edit Fields').item.json.keyword_search_term_1 }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "DATEVALUE_POST",
              "displayName": "DATEVALUE_POST",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "subreddit",
              "displayName": "subreddit",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "selftext",
              "displayName": "selftext",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "author_fullname",
              "displayName": "author_fullname",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "upvotes",
              "displayName": "upvotes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "upvote ratio",
              "displayName": "upvote ratio",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "comment number",
              "displayName": "comment number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        64,
        224
      ],
      "id": "fa249766-1257-4efc-bb1e-c2d82c5ba2a8",
      "name": "Append row in sheet"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reddit Post Search",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "STATUS",
              "lookupValue": "PENDING"
            },
            {
              "lookupColumn": "STATUS",
              "lookupValue": "STOP"
            }
          ]
        },
        "combineFilters": "OR",
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        272,
        224
      ],
      "id": "64d60702-3a48-4c07-8d0a-285417fcc428",
      "name": "Get row(s) in sheet",
      "executeOnce": true
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Post Title: {{ $('Get row(s) in sheet').item.json.title }}\n\nSelf-Text: {{ $('Get row(s) in sheet').item.json.selftext }}",
        "options": {
          "systemMessage": "=You are a YouTube video idea master and your primary role is to obtain Reddit posts from the user (titles and self-text and upvote and comment stats) and determine whether these ideas can be turned into material for a YouTube video. Should you deem the idea unsuitable for a YouTube video, you will return just a single word response; \"VOID.\" However, should you determine that the content shared with you has potential to be expanded into a YouTube video idea; you will return the following... \"ACCEPT.\"\n\nUnder no circumstance shall you return anything else.\n\nThe priority that you should bear in mind should be that these ideas need to be highly engaging and have potential to entertain and educate the audience as well as go viral. With this in mind, when determining if content shared with you is worth turning into a YouTube video idea... you must consider the following facets of information (i) how click-worthy an idea is (ii) whether we could spin this idea and provide a unique angle that will prove insightful and refreshing and/or (iii) audience goals when watching the video about said idea."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -480,
        432
      ],
      "id": "02b53ef0-9e38-4986-8648-0c1115ee3956",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code').item.json.randomString }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -384,
        592
      ],
      "id": "6a4ec338-8072-4f70-aa38-6731d638225c",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -480,
        592
      ],
      "id": "223c0f66-dbc8-4a03-88ef-50dc299aef3f",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Provides the AI Agent with transcripts of well-performing videos within the niche to guide it on how to best create content that resonates and performs well with its intended audience.",
        "qdrantCollection": {
          "__rl": true,
          "value": "NandyCyberSuccess_YT_Reference",
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess_YT_Reference"
        },
        "topK": 10,
        "useReranker": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        48,
        992
      ],
      "id": "2db94972-aeaf-495c-a556-db212acaa5f7",
      "name": "Qdrant Vector Store1"
    },
    {
      "parameters": {
        "modelName": "embed-english-v3.0"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        64,
        1088
      ],
      "id": "1c5890f4-55b8-43f7-871e-512901e98f59",
      "name": "Embeddings Cohere",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "typeVersion": 1,
      "position": [
        144,
        1088
      ],
      "id": "d903f5b3-d6cb-4128-a8e5-3800c4a6a0c0",
      "name": "Reranker Cohere",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 435359465,
          "mode": "list",
          "cachedResultName": "YouTube Search Results",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=435359465"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "STATUS",
              "lookupValue": "DONE"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        -480,
        -128
      ],
      "id": "d7ea479e-efdc-4e07-9842-2072cd664ea8",
      "name": "Get row(s) in sheet in Google Sheets"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Post Title: {{ $('Get row(s) in sheet').item.json.title }}\n\nSelf-Text: {{ $('Get row(s) in sheet').item.json.selftext }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=You are a YouTube video idea master and your primary role is to obtain Reddit posts from the user (titles and self-text and upvote and comment stats) and determine how to turn these ideas into material for a YouTube video. Here is what you will return based on the content that you are provided:\n\n\n(1) Whether the video in question will be a \"YouTube Short\" or a \"YouTube Long\" and (2) A suggested duration for this video in minutes\n(3) A Title for the YouTube Video you have in mind\n(4) A Hook for the YouTube Video you have in mind\n(5) A Unique angle and/or perspective you suggest we offer in the video\n(6) An outline of the points mentioned/covered in the video in the form of 4-6 bullet points with each bullet point being between 10-20 words long\n\nUnder no circumstance shall you return anything else.\n\nThe priority that you should bear in mind should be that these ideas need to be highly engaging and have potential to entertain and educate the audience as well as go viral. With this in mind, when determining if content shared with you is worth turning into a YouTube video idea... you must consider the following facets of information (i) how click-worthy an idea is (ii) whether we could spin this idea and provide a unique angle that will prove insightful and refreshing and/or (iii) audience goals when watching the video about said idea.\n\nYou have been provided with a vector store to enable you to better guage audience priorities. The vector store should NEVER EVER EVER serve the role of content guidance, but it should inform you on audience tastes. The content must in all circumstances be derived from the user input (The content of the Reddit post in question)"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        112,
        608
      ],
      "id": "66589472-d412-4948-a12a-f868bdc3d6e1",
      "name": "AI Agent1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "eebea018-c8d6-4e3a-8626-ff2a5568d324",
              "leftValue": "={{ $json.output }}",
              "rightValue": "VOID",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -160,
        432
      ],
      "id": "30b0a9dc-63cf-4f5b-ae3f-5d8b97faaab0",
      "name": "If"
    },
    {
      "parameters": {
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\n\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\n\nreturn [{ json: { randomString: result } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        224
      ],
      "id": "80e70bcc-3809-48e5-855a-cc47dc43c333",
      "name": "Code"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code1').item.json.randomString }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        160,
        864
      ],
      "id": "525db48d-8d07-4b0c-ba8c-ec08a8ba1810",
      "name": "Simple Memory1"
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"video_type\": \"YouTube Long\",\n  \"suggested_duration_minutes\": 8,\n  \"title\": \"I Automated My Mornings: 7 Simple Systems That Gave Me Back 2 Hours\",\n  \"hook\": \"My mornings used to be chaos—then I built seven tiny automations that saved my sanity.\",\n  \"unique_angle\": \"Instead of vague productivity tips, this shows screen-level automations and fail-safes anyone can copy in minutes, including traffic-aware departures, checklist triggers, and weekly audits that keep the system honest.\",\n  \"outline_bullets\": [\n    \"Set a baseline: time audit, pain points, and the single highest-friction task you dread.\",\n    \"Calendar and commute automation: traffic-aware departures and buffer blocks to prevent cascading delays.\",\n    \"Template mornings: pre-filled breakfast, outfit, and packing checklists triggered by weekday context.\",\n    \"Phone detox: delayed notifications, focus modes, and do-not-disturb exceptions for true emergencies.\",\n    \"Fail-safes: manual override, fallback routines, and weekly review to keep every system honest.\"\n  ]\n}\n",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        176,
        784
      ],
      "id": "5373e67c-1847-44a9-a28a-ce6e025bbf0a",
      "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": [
        272,
        880
      ],
      "id": "4ccd8f66-54f7-40af-9752-9d0982e81eec",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        64,
        864
      ],
      "id": "d9d257ea-4136-407b-93e1-a3267a4b100c",
      "name": "OpenAI Chat Model2",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\n\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\n\nreturn [{ json: { randomString: result } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        848,
        224
      ],
      "id": "31965730-daf9-4177-919e-41e3275b5a9d",
      "name": "Code1"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reddit Post Search",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "={{ $json.output }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "DATEVALUE_POST",
              "displayName": "DATEVALUE_POST",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "subreddit",
              "displayName": "subreddit",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "selftext",
              "displayName": "selftext",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "author_fullname",
              "displayName": "author_fullname",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "upvotes",
              "displayName": "upvotes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "upvote ratio",
              "displayName": "upvote ratio",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "comment number",
              "displayName": "comment number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": 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": [
        224,
        416
      ],
      "id": "612f4d24-ee83-4173-841e-34dd8f5f051d",
      "name": "Update row in sheet"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reddit Post Search",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "={{ $json.output }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "DATEVALUE_POST",
              "displayName": "DATEVALUE_POST",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "subreddit",
              "displayName": "subreddit",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "selftext",
              "displayName": "selftext",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "author_fullname",
              "displayName": "author_fullname",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "upvotes",
              "displayName": "upvotes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "upvote ratio",
              "displayName": "upvote ratio",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "comment number",
              "displayName": "comment number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": 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": [
        -160,
        608
      ],
      "id": "ff8672d1-d86a-4296-8958-aa14c003806e",
      "name": "Update row in sheet1"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Provides the AI Agent with transcripts of well-performing videos within the niche to guide it on how to best create content that resonates and performs well with its intended audience.",
        "qdrantCollection": {
          "__rl": true,
          "value": "NandyCyberSuccess_YT_Reference",
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess_YT_Reference"
        },
        "topK": 10,
        "useReranker": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        656,
        992
      ],
      "id": "4f752fce-40bb-445c-b5fa-d84829e1d7ee",
      "name": "Qdrant Vector Store"
    },
    {
      "parameters": {
        "modelName": "embed-english-v3.0"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        672,
        1088
      ],
      "id": "c68d4f5c-7e83-4702-9b0c-52a5d67ee130",
      "name": "Embeddings Cohere1",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "typeVersion": 1,
      "position": [
        752,
        1088
      ],
      "id": "7aa67a6f-8160-49be-8001-5e7a1f2748c5",
      "name": "Reranker Cohere1",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Video Title: {{ $json.output.title }}\n\nHook: {{ $json.output.hook }}\n\nOutline: {{ $json.output.outline_bullets }}\n\nUnique Angle: {{ $json.output.unique_angle }}\n\nVideo Type: {{ $json.output.video_type }}\n\nDuration/Word Count: {{ $json.output.suggested_duration_minutes }} minutes with each minutes being equivelent to 150 words of scripted content\n\nYouTube CTA: Subscribe to the channel\n\nYouTube Creator Persona: Nandy Bo—a cybersecurity consultant with over 16 years of industry experience securing companies large and small, earning over $2M in freelance consulting earnings through Upwork and elsewhere.",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=You are a master YouTube scriptwriter. Your job is to turn user briefs into highly engaging, watchable scripts that inform, entertain, and have real viral potential.\n\nNorth Star\n\nOptimize for:\n\nClick‑worthiness (title + thumbnail copy + hook),\n\nUnique, insightful angle, and\n\nAudience goal satisfaction (what viewers want to learn/feel/do).\n\nUse of knowledge\n\nYou have access to a vector store containing audience preferences and examples of “what great looks like.”\nUse the vector store ONLY to shape how you write (tone, pacing, style, structure). Never to decide what facts to state.\n\nIf the brief requires facts not supplied by the user, you may request tools (e.g., SerpAPI search, Wikipedia) via the agent to gather or verify information. Summarize externally sourced facts concisely and list them in citations. If tools are unavailable, avoid unverifiable claims.\n\nOutput contract\n\nOutput valid JSON only that conforms to the “YouTubeScript” schema provided (min 4, max 12 sections).\n\nEvery section’s content must begin with a label in caps, e.g., \"HOOK: …\", \"BIG QUESTION / PROBLEM: …\".\n\nMatch the requested length (meta.duration_seconds & meta.target_word_count). Allocate duration_estimate_s per section so totals ≈ requested run time.\n\nInclude title options, thumbnail text options, SEO block, chapter markers, and visual guidance (B‑roll/graphics suggestions) to aid production.\n\nAdd scores (click_worthiness, novelty, audience_fit) with one‑line rationale in notes. Flag anything risky in risk_flags.\n\nRespect the user’s creator persona and CTAs.\n\nWriting rules\n\nHook (≤20s): bold claim, paradox, or visual. Create a curiosity gap; avoid spoilers.\n\nClarity > cleverness. Short sentences, strong verbs, avoid jargon unless persona demands.\n\nUse beats within sections to keep momentum; prefer concrete examples.\n\nWhen using numbers or named entities, prefer tool‑verified facts and record citations.\n\nClose with Implications / Recap / CTA tied to the creator’s goals.\n\nIf the input is thin\n\nProceed with best‑effort assumptions consistent with persona and audience; note assumptions in meta.assumptions.\n\nReturn only the JSON object."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        720,
        608
      ],
      "id": "469cc805-99c6-4b29-85b9-8e679d4292a1",
      "name": "AI Agent2"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code1').item.json.randomString }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        768,
        864
      ],
      "id": "2cb37c47-90e6-449a-a2c8-6a55190c2c05",
      "name": "Simple Memory2"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"$id\": \"https://example.com/schemas/youtube_script.schema.json\",\n  \"title\": \"YouTubeScript\",\n  \"type\": \"object\",\n  \"additionalProperties\": false,\n  \"required\": [\"version\", \"meta\", \"sections\", \"seo\", \"production\", \"scores\"],\n  \"properties\": {\n    \"version\": { \"type\": \"string\", \"const\": \"1.0\" },\n    \"meta\": {\n      \"type\": \"object\",\n      \"additionalProperties\": false,\n      \"required\": [\n        \"proposed_title\",\n        \"title_options\",\n        \"video_type\",\n        \"duration_seconds\",\n        \"target_word_count\",\n        \"words_per_minute\",\n        \"cta\",\n        \"persona\",\n        \"audience_goals\"\n      ],\n      \"properties\": {\n        \"proposed_title\": { \"type\": \"string\", \"minLength\": 3 },\n        \"title_options\": {\n          \"type\": \"array\",\n          \"items\": { \"type\": \"string\" },\n          \"minItems\": 2,\n          \"maxItems\": 6\n        },\n        \"thumbnail_text_options\": {\n          \"type\": \"array\",\n          \"items\": { \"type\": \"string\" },\n          \"minItems\": 2,\n          \"maxItems\": 6\n        },\n        \"video_type\": {\n          \"type\": \"string\",\n          \"enum\": [\"Short\", \"Standard\", \"Long\"]\n        },\n        \"duration_seconds\": { \"type\": \"integer\", \"minimum\": 60 },\n        \"target_word_count\": { \"type\": \"integer\", \"minimum\": 200 },\n        \"words_per_minute\": { \"type\": \"integer\", \"minimum\": 90, \"maximum\": 190 },\n        \"unique_angle\": { \"type\": \"string\" },\n        \"cta\": {\n          \"type\": \"array\",\n          \"items\": { \"type\": \"string\" },\n          \"minItems\": 1,\n          \"maxItems\": 5\n        },\n        \"persona\": {\n          \"type\": \"object\",\n          \"additionalProperties\": false,\n          \"required\": [\"name\", \"expertise\", \"voice_tones\"],\n          \"properties\": {\n            \"name\": { \"type\": \"string\" },\n            \"expertise\": { \"type\": \"string\" },\n            \"voice_tones\": {\n              \"type\": \"array\",\n              \"items\": { \"type\": \"string\" },\n              \"minItems\": 1,\n              \"maxItems\": 5\n            }\n          }\n        },\n        \"audience_goals\": {\n          \"type\": \"array\",\n          \"items\": { \"type\": \"string\" },\n          \"minItems\": 1,\n          \"maxItems\": 6\n        },\n        \"assumptions\": {\n          \"type\": \"array\",\n          \"items\": { \"type\": \"string\" }\n        }\n      }\n    },\n    \"sections\": {\n      \"type\": \"array\",\n      \"minItems\": 4,\n      \"maxItems\": 12,\n      \"items\": {\n        \"type\": \"object\",\n        \"additionalProperties\": false,\n        \"required\": [\"id\", \"type\", \"label\", \"content\", \"beats\", \"duration_estimate_s\"],\n        \"properties\": {\n          \"id\": { \"type\": \"string\", \"pattern\": \"^[0-9]{2}$\" },\n          \"type\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"HOOK\",\n              \"BIG_QUESTION_OR_PROBLEM\",\n              \"WHY_IT_MATTERS\",\n              \"TEASE_PAYOFF\",\n              \"CREDIBILITY_AND_ROADMAP\",\n              \"BACKGROUND_PRIMER\",\n              \"HYPOTHESIS_OR_PLAN\",\n              \"DEMONSTRATION_OR_EXPERIMENT\",\n              \"RESULTS_REVEAL\",\n              \"MECHANISM_OR_EXPLANATION\",\n              \"EDGE_CASES_MYTHS_LIMITATIONS\",\n              \"IMPLICATIONS_RECAP_CTA\"\n            ]\n          },\n          \"label\": { \"type\": \"string\", \"minLength\": 3 },\n          \"content\": { \"type\": \"string\", \"minLength\": 20 },\n          \"beats\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" },\n            \"minItems\": 1\n          },\n          \"visuals\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          },\n          \"on_screen_text\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          },\n          \"duration_estimate_s\": { \"type\": \"integer\", \"minimum\": 5, \"maximum\": 240 }\n        }\n      }\n    },\n    \"seo\": {\n      \"type\": \"object\",\n      \"additionalProperties\": false,\n      \"required\": [\"keywords\", \"description\", \"chapters\"],\n      \"properties\": {\n        \"keywords\": {\n          \"type\": \"array\",\n          \"items\": { \"type\": \"string\" },\n          \"minItems\": 3\n        },\n        \"description\": { \"type\": \"string\" },\n        \"chapters\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"additionalProperties\": false,\n            \"required\": [\"timecode\", \"title\"],\n            \"properties\": {\n              \"timecode\": { \"type\": \"string\", \"pattern\": \"^[0-9]{2}:[0-9]{2}$\" },\n              \"title\": { \"type\": \"string\" }\n            }\n          }\n        }\n      }\n    },\n    \"production\": {\n      \"type\": \"object\",\n      \"additionalProperties\": false,\n      \"required\": [\"broll_prompts\", \"graphics_prompts\", \"citations\"],\n      \"properties\": {\n        \"broll_prompts\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n        \"graphics_prompts\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n        \"citations\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"additionalProperties\": false,\n            \"required\": [\"source\", \"url\"],\n            \"properties\": {\n              \"source\": { \"type\": \"string\" },\n              \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n              \"note\": { \"type\": \"string\" }\n            }\n          }\n        }\n      }\n    },\n    \"scores\": {\n      \"type\": \"object\",\n      \"additionalProperties\": false,\n      \"required\": [\"click_worthiness\", \"novelty\", \"audience_fit\", \"notes\", \"risk_flags\"],\n      \"properties\": {\n        \"click_worthiness\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100 },\n        \"novelty\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100 },\n        \"audience_fit\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100 },\n        \"notes\": { \"type\": \"string\" },\n        \"risk_flags\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n      }\n    }\n  }\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        784,
        784
      ],
      "id": "96cd2162-2fc0-4d7b-81d5-9df46d535d4f",
      "name": "Structured Output Parser1"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        880,
        896
      ],
      "id": "069bd567-f5ed-47e8-86a1-ff4abf304031",
      "name": "OpenAI Chat Model3",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        656,
        800
      ],
      "id": "1c99066c-82d7-4d77-b91c-0d9cf212c272",
      "name": "OpenAI Chat Model4",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reddit Post Search",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=DONE"
          },
          "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
            },
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "DATEVALUE_POST",
              "displayName": "DATEVALUE_POST",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "subreddit",
              "displayName": "subreddit",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "selftext",
              "displayName": "selftext",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "author_fullname",
              "displayName": "author_fullname",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "upvotes",
              "displayName": "upvotes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "upvote ratio",
              "displayName": "upvote ratio",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "comment number",
              "displayName": "comment number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "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": [
        1248,
        608
      ],
      "id": "fd82560d-4065-4333-964b-4eea9bff8fe7",
      "name": "Update row in sheet2"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        848,
        1088
      ],
      "id": "bb503942-b838-474f-9824-b4f515246a48",
      "name": "SerpAPI",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Provides the AI Agent with transcripts of well-performing videos within the niche to guide it on how to best create content that resonates and performs well with its intended audience.",
        "qdrantCollection": {
          "__rl": true,
          "value": "NandyCyberSuccess_YT_Reference",
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess_YT_Reference"
        },
        "topK": 10,
        "useReranker": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        -1168,
        976
      ],
      "id": "c310c841-8ca6-4ae6-9548-07b3dd20be89",
      "name": "Qdrant Vector Store2"
    },
    {
      "parameters": {
        "modelName": "embed-english-v3.0"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        -1168,
        1072
      ],
      "id": "8406640b-870d-4b07-b75b-7e938393b7ff",
      "name": "Embeddings Cohere2",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "typeVersion": 1,
      "position": [
        -1088,
        1072
      ],
      "id": "9030f52a-abd5-46f4-8d9e-0c7d62b47102",
      "name": "Reranker Cohere2",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Video Title: {{ $json.output.title }}\n\nHook: {{ $json.output.hook }}\n\nOutline: {{ $json.output.outline_bullets }}\n\nUnique Angle: {{ $json.output.unique_angle }}\n\nVideo Type: {{ $json.output.video_type }}\n\nDuration/Word Count: {{ $json.output.suggested_duration_minutes }} minutes with each minutes being equivelent to 150 words of scripted content\n\nYouTube CTA: Subscribe to the channel\n\nYouTube Creator Persona: Nandy Bo—a cybersecurity consultant with over 16 years of industry experience securing companies large and small, earning over $2M in freelance consulting earnings through Upwork and elsewhere.",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=You are a master YouTube scriptwriter whose job it is to come up with highly engaging scripts for YouTube videos based on the information that you are given. The priority that you should bear in mind should be that these ideas need to be highly engaging and have potential to entertain and educate the audience as well as go viral. With this in mind, when determining if content shared with you is worth turning into a YouTube video idea... you must consider the following facets of information (i) how click-worthy an idea is (ii) whether we could spin this idea and provide a unique angle that will prove insightful and refreshing and/or (iii) audience goals when watching the video about said idea. You have been provided with a vector store to enable you to better guage audience priorities and preferences and what sets a good YouTube video apart from a bad one. Use the vector store to inform you on HOW YOU SHOULD WRITE. NEVER USE THE VECTOR STORE TO INFORM YOU ON WHAT YOU SHOULD WRITE. The length and the exact sections of what you will write will vary depending on the length and type of the video, so it is important to keep yourself flexible and output your text in clearly marked/labeled sections. For example, split the video's hook from the introduction through JSON and when outputting the hook... you should output it like this \"HOOK: This is an example showing how the AI agent should output a section.\" You should do this for all sections. You must output a minimum of 4 sections (for very short videos) and a maximum of 12 sections (for very long videos). Generally speaking, video scripts tend to have the following sections: 1. Hook — Grab attention with a bold claim, paradox, or visual. Create a curiosity gap. 2. Big Question / Problem — State the exact question you’ll answer or the mystery you’ll solve. 3. Why It Matters (Stakes) — Explain the real-world payoff: health, tech, climate, everyday life, or pure wonder. 4. Tease the Payoff (Thesis in a Sentence) — Give a quick hint of the answer so viewers know the journey is worth it. 5. Brief Credibility + Roadmap — One-liner about who you are, then outline the steps you’ll take. 6. Essentials / Background Primer — Only the minimum concepts, terms, or history needed to follow the story. 7. Hypothesis / Plan — What you expect to happen and how you’ll test or demonstrate it. 8. Demonstration / Experiment — Show the procedure clearly. Build tension with checkpoints and “what could go wrong.” 9. Results Reveal — Present outcomes with clear measurements/visuals; avoid info overload. 10. Mechanism / Explanation — Translate results into “how it works” using visuals, analogies, and simple math if needed. 11. Edge Cases, Myths, and Limitations — Address common misconceptions, uncertainties, and what the data can’t tell us. 12. Implications, Recap, and CTA — Summarize the takeaway, note applications or next questions, then invite action (comment, subscribe, related video/end screen). The user will supply you in their prompt with the persona/details of the YouTube creator as well as what CTAs to include."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -1120,
        592
      ],
      "id": "f68f059b-abc3-4247-93d2-4f78cf75622a",
      "name": "AI Agent3"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code1').item.json.randomString }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -1072,
        848
      ],
      "id": "e3cec297-3b8f-48c2-862d-a7a41c0b9d90",
      "name": "Simple Memory3"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"YouTube Video Script\",\n  \"description\": \"A schema for a highly engaging YouTube video script composed of a flexible number of sections.\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"hook\": {\n      \"type\": \"string\",\n      \"description\": \"Grabs the audience's attention with a bold claim, paradox, or compelling visual to create a curiosity gap.\"\n    },\n    \"big_question_problem\": {\n      \"type\": \"string\",\n      \"description\": \"States the exact question the video will answer or the mystery it will solve.\"\n    },\n    \"why_it_matters_stakes\": {\n      \"type\": \"string\",\n      \"description\": \"Explains the real-world payoff or significance of the topic (e.g., health, tech, daily life).\"\n    },\n    \"tease_the_payoff\": {\n      \"type\": \"string\",\n      \"description\": \"A quick hint of the answer or conclusion to assure viewers the video is worth watching.\"\n    },\n    \"credibility_and_roadmap\": {\n      \"type\": \"string\",\n      \"description\": \"A brief statement on the creator's credibility and an outline of the video's structure or steps.\"\n    },\n    \"background_primer\": {\n      \"type\": \"string\",\n      \"description\": \"Provides the minimum necessary concepts, terms, or history needed for the audience to follow along.\"\n    },\n    \"hypothesis_plan\": {\n      \"type\": \"string\",\n      \"description\": \"Outlines what is expected to happen and how it will be tested or demonstrated.\"\n    },\n    \"demonstration_experiment\": {\n      \"type\": \"string\",\n      \"description\": \"The core segment showing the procedure, experiment, or process, building tension and clarity.\"\n    },\n    \"results_reveal\": {\n      \"type\": \"string\",\n      \"description\": \"Presents the outcomes of the demonstration with clear measurements or visuals.\"\n    },\n    \"mechanism_explanation\": {\n      \"type\": \"string\",\n      \"description\": \"Translates the results into an explanation of 'how it works' using analogies, visuals, or simple math.\"\n    },\n    \"edge_cases_myths_limitations\": {\n      \"type\": \"string\",\n      \"description\": \"Addresses common misconceptions, uncertainties, edge cases, and what the data cannot explain.\"\n    },\n    \"implications_recap_cta\": {\n      \"type\": \"string\",\n      \"description\": \"Summarizes the main takeaway, discusses applications or next questions, and includes the call to action (e.g., comment, subscribe).\"\n    }\n  },\n  \"minProperties\": 4,\n  \"maxProperties\": 12,\n  \"additionalProperties\": false,\n  \"examples\": [\n    {\n      \"hook\": \"What if the biggest secret to productivity isn't doing more, but doing less? A lot less.\",\n      \"big_question_problem\": \"In this video, we're going to test a radical productivity method called 'Time Minimalism' to see if it actually works or if it's just a myth.\",\n      \"why_it_matters_stakes\": \"Getting this right could save you 10 hours a week. Getting it wrong could derail your most important projects.\",\n      \"demonstration_experiment\": \"For the next seven days, I'm ditching my 50-item to-do list for just ONE daily task. I'll track my output, stress levels, and overall progress.\",\n      \"results_reveal\": \"The results were not what I expected. On day three, my output tanked, but by day seven, something incredible happened.\",\n      \"implications_recap_cta\": \"So, the key takeaway is that 'Time Minimalism' forces deep, focused work. If you want to see how this compares to the 'Pomodoro Technique', check out this video right here. And don't forget to subscribe for more productivity experiments!\"\n    }\n  ]\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -1056,
        768
      ],
      "id": "44da7a0b-90fa-4ca2-ba83-51abb6461c40",
      "name": "Structured Output Parser2"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -960,
        880
      ],
      "id": "bfa60e4d-197a-439c-8846-4dc90c9fbbbe",
      "name": "OpenAI Chat Model5",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -1184,
        784
      ],
      "id": "6c1db603-feb4-460e-b0f0-cecd5e4f47bc",
      "name": "OpenAI Chat Model6",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        -992,
        1072
      ],
      "id": "45324b53-17d1-4448-b619-8be18af06d7d",
      "name": "SerpAPI1",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 154052170,
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess Scripts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=154052170"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "description": "={{ $json.output.seo.description }}",
            "keywords": "={{ $json.output.seo.keywords }}",
            "sections[10]": "={{ $json.output.sections[9].content }}",
            "sections[9]": "={{ $json.output.sections[8].content }}",
            "sections[8]": "={{ $json.output.sections[7].content }}",
            "sections[7]": "={{ $json.output.sections[6].content }}",
            "sections[6]": "={{ $json.output.sections[5].content }}",
            "sections[5]": "={{ $json.output.sections[4].content }}",
            "sections[4]": "={{ $json.output.sections[3].content }}",
            "sections[3]": "={{ $json.output.sections[2].content }}",
            "sections[2]": "={{ $json.output.sections[1].content }}",
            "sections[1]": "={{ $json.output.sections[0].content }}",
            "sections[11]": "={{ $json.output.sections[10].content }}",
            "sections[12]": "={{ $json.output.sections[11].content }}",
            "outline_bullets": "={{ $('AI Agent1').item.json.output.outline_bullets }}",
            "unique_angle": "={{ $('AI Agent1').item.json.output.unique_angle }}",
            "hook": "={{ $('AI Agent1').item.json.output.hook }}",
            "title": "={{ $('AI Agent1').item.json.output.title }}",
            "suggested_duration_minutes": "={{ $('AI Agent1').item.json.output.suggested_duration_minutes }}",
            "video_type": "={{ $('AI Agent1').item.json.output.video_type }}",
            "permalink": "={{ $('Get row(s) in sheet').item.json.permalink }}",
            "DATEVALUE_CURRENT": "={{ $('Get row(s) in sheet').item.json.DATEVALUE_CURRENT }}",
            "STATUS": "PENDING"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "STATUS",
              "displayName": "STATUS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "final_script",
              "displayName": "final_script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "final_script_v2",
              "displayName": "final_script_v2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "video_type",
              "displayName": "video_type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "suggested_duration_minutes",
              "displayName": "suggested_duration_minutes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "keywords",
              "displayName": "keywords",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "hook",
              "displayName": "hook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "unique_angle",
              "displayName": "unique_angle",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "outline_bullets",
              "displayName": "outline_bullets",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "description",
              "displayName": "description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[1]",
              "displayName": "sections[1]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[2]",
              "displayName": "sections[2]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[3]",
              "displayName": "sections[3]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[4]",
              "displayName": "sections[4]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[5]",
              "displayName": "sections[5]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[6]",
              "displayName": "sections[6]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[7]",
              "displayName": "sections[7]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[8]",
              "displayName": "sections[8]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[9]",
              "displayName": "sections[9]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[10]",
              "displayName": "sections[10]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[11]",
              "displayName": "sections[11]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "sections[12]",
              "displayName": "sections[12]",
              "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": [
        1040,
        608
      ],
      "id": "e9923541-e845-4032-aff8-e88d4aab5bf6",
      "name": "Append row in sheet1"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Provides the AI Agent with transcripts of well-performing videos within the niche to guide it on how to best create content that resonates and performs well with its intended audience.",
        "qdrantCollection": {
          "__rl": true,
          "value": "NandyCyberSuccess_YT_Reference",
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess_YT_Reference"
        },
        "topK": 10,
        "useReranker": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        1952,
        768
      ],
      "id": "519d8478-4fed-41fe-ac99-10ac622d008c",
      "name": "Qdrant Vector Store3"
    },
    {
      "parameters": {
        "modelName": "embed-english-v3.0"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        1952,
        864
      ],
      "id": "d78a349b-5d3d-4c48-969d-1d2d501cf239",
      "name": "Embeddings Cohere3",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "typeVersion": 1,
      "position": [
        2032,
        864
      ],
      "id": "f8e383be-2f9d-4fae-bfff-5e673c5d1da7",
      "name": "Reranker Cohere3",
      "credentials": {
        "cohereApi": {
          "id": "2KLyMaAZiNcfpMpr",
          "name": "CohereApi account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Outline:\n{{ $('Append row in sheet1').item.json['sections[1]'] }}\n{{ $('Append row in sheet1').item.json['sections[2]'] }}\n{{ $('Append row in sheet1').item.json['sections[3]'] }}\n{{ $('Append row in sheet1').item.json['sections[4]'] }}\n{{ $('Append row in sheet1').item.json['sections[5]'] }}\n{{ $('Append row in sheet1').item.json['sections[6]'] }}\n{{ $('Append row in sheet1').item.json['sections[7]'] }}\n{{ $('Append row in sheet1').item.json['sections[8]'] }}\n{{ $('Append row in sheet1').item.json['sections[9]'] }}\n{{ $('Append row in sheet1').item.json['sections[10]'] }}\n{{ $('Append row in sheet1').item.json['sections[11]'] }}\n{{ $('Append row in sheet1').item.json['sections[12]'] }}\n\nHook: {{ $('Append row in sheet1').item.json.hook }}\n\nUnique Angle: {{ $('Append row in sheet1').item.json.unique_angle }}\n\nDuration/Word Count: {{ $('Append row in sheet1').item.json.suggested_duration_minutes }} minutes with each minutes being equivelent to 150 words of scripted content\n\nYouTube CTA: Subscribe to the channel\n\nYouTube Creator Persona: Nandy Bo—a cybersecurity consultant with over 16 years of industry experience securing companies large and small, earning over $2M in freelance consulting earnings through Upwork and elsewhere.\n\nThe output you provide MUST BE teleprompter ready. This means, I should be able to copy and paste it directly into a teleprompter app to read from. Under no circumstance should you include anything that would distract from the narration in your output.",
        "options": {
          "systemMessage": "=You will be provided with a video script outline and a target duration and your job will be to make this script better and more compelling to a YouTube audience + also ensure that it meets the word length suggested using the various tools you're attached to.\n\nGenerally speaking, video scripts tend to have the following sections:\n\n1. Hook — Grab attention with a bold claim, paradox, or visual. Create a curiosity gap.\n2. Big Question / Problem — State the exact question you’ll answer or the mystery you’ll solve.\n3. Why It Matters (Stakes) — Explain the real-world payoff: health, tech, climate, everyday life, or pure wonder.\n4. Tease the Payoff (Thesis in a Sentence) — Give a quick hint of the answer so viewers know the journey is worth it.\n5. Brief Credibility + Roadmap — One-liner about who you are, then outline the steps you’ll take.\n6. Essentials / Background Primer — Only the minimum concepts, terms, or history needed to follow the story.\n7. Hypothesis / Plan — What you expect to happen and how you’ll test or demonstrate it.\n8. Demonstration / Experiment — Show the procedure clearly. Build tension with checkpoints and “what could go wrong.”\n9. Results Reveal — Present outcomes with clear measurements/visuals; avoid info overload.\n10. Mechanism / Explanation — Translate results into “how it works” using visuals, analogies, and simple math if needed.\n11. Edge Cases, Myths, and Limitations — Address common misconceptions, uncertainties, and what the data can’t tell us. 12. Implications, Recap, and CTA — Summarize the takeaway, note applications or next questions, then invite action (comment, subscribe, related video/end screen).\n\nThe user will supply you in their prompt with the persona/details of the YouTube creator as well as what CTAs to include.\n\nThe output you provide MUST BE teleprompter ready. This means, I should be able to copy and paste it directly into a teleprompter app to read from. Under no circumstance should you include anything that would distract from the narration in your output."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        1968,
        608
      ],
      "id": "b3b5d504-644f-497c-98cb-b6106a4164af",
      "name": "AI Agent4"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code2').item.json.randomString }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        2064,
        464
      ],
      "id": "70763148-51fa-4de4-9e1f-54ff437afb1a",
      "name": "Simple Memory4"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        2112,
        864
      ],
      "id": "2865992d-e64f-4088-9d28-ed4cc2c8dfd2",
      "name": "SerpAPI2",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nlet result = '';\nlet length = 48; // Desired length of the random string\n\nfor (let i = 0; i < length; i++) {\n  result += characters.charAt(Math.floor(Math.random() * characters.length));\n}\n\nreturn [{ json: { randomString: result } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1408,
        608
      ],
      "id": "4dfd8ad6-4dd4-4deb-af25-999db91a45c7",
      "name": "Code2"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 154052170,
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess Scripts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=154052170"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "STATUS",
              "lookupValue": "PENDING"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1712,
        608
      ],
      "id": "4e524fef-93d7-4810-be2e-5302618b8b1f",
      "name": "Get row(s) in sheet1"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 154052170,
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess Scripts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=154052170"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "READY",
            "row_number": "={{ $('Get row(s) in sheet1').item.json.row_number }}",
            "final_script": "={{ $json.output }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "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": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "final_script",
              "displayName": "final_script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "final_script_v2",
              "displayName": "final_script_v2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "video_type",
              "displayName": "video_type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "suggested_duration_minutes",
              "displayName": "suggested_duration_minutes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "keywords",
              "displayName": "keywords",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "hook",
              "displayName": "hook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "unique_angle",
              "displayName": "unique_angle",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "outline_bullets",
              "displayName": "outline_bullets",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "description",
              "displayName": "description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[1]",
              "displayName": "sections[1]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[2]",
              "displayName": "sections[2]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[3]",
              "displayName": "sections[3]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[4]",
              "displayName": "sections[4]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[5]",
              "displayName": "sections[5]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[6]",
              "displayName": "sections[6]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[7]",
              "displayName": "sections[7]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[8]",
              "displayName": "sections[8]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[9]",
              "displayName": "sections[9]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[10]",
              "displayName": "sections[10]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[11]",
              "displayName": "sections[11]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[12]",
              "displayName": "sections[12]",
              "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": [
        2320,
        608
      ],
      "id": "a6ba6c32-b567-43e1-ba70-621cf07eab85",
      "name": "Update row in sheet3"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        16,
        16
      ],
      "id": "15758a7e-a4a7-4221-8631-f0b5e6ac2857",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "content": "",
        "height": 192,
        "width": 192,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        192
      ],
      "typeVersion": 1,
      "id": "ce3c8839-a085-430a-87f4-3e83079aa55c",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "model": "grok-4-0709",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "typeVersion": 1,
      "position": [
        1840,
        816
      ],
      "id": "acd510be-cf0f-4b22-a597-7629d9b83f31",
      "name": "xAI Grok Chat Model"
    },
    {
      "parameters": {
        "content": "",
        "height": 912,
        "width": 480,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        48
      ],
      "typeVersion": 1,
      "id": "ac346127-221b-4006-84d6-1a2422bda082",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Your main job here is to realise that this is a YouTube video script and, therefore, you should recieve this script and cut the filler so that it is incredibly engaging and ensures that audiences are able to follow the points being made and not be bored.\n\nDo not alter the word count.\n\nIf you need to obtain information from external sources, you may use the SerpAPI node to access Google Search.\n\n{{ $json.final_script }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        2544,
        608
      ],
      "id": "9803f5a2-1fec-4ff6-8e70-8867b4e1929a",
      "name": "AI Agent5"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Code2').item.json.randomString }}",
        "contextWindowLength": 20
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        2640,
        464
      ],
      "id": "a1a53a0b-2c5c-4f2f-ac68-744abf33cd2f",
      "name": "Simple Memory5"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        2544,
        784
      ],
      "id": "b817243f-fd0c-438f-a179-65856c225244",
      "name": "OpenAI Chat Model7",
      "credentials": {
        "openAiApi": {
          "id": "OjRKrQXB019XKwdP",
          "name": "OpenAi Account (Personal)"
        }
      }
    },
    {
      "parameters": {
        "options": {
          "gl": "us",
          "google_domain": "google.com",
          "hl": "en"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        2688,
        784
      ],
      "id": "85244bc2-7ccc-4f85-98c6-5eb94ee6b83c",
      "name": "SerpAPI3",
      "credentials": {
        "serpApi": {
          "id": "A7ogaA7Ye8tWnNxu",
          "name": "SerpAPI account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 154052170,
          "mode": "list",
          "cachedResultName": "NandyCyberSuccess Scripts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=154052170"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "STATUS": "READY",
            "row_number": "={{ $('Get row(s) in sheet1').item.json.row_number }}",
            "final_script": "={{ $json.output }}",
            "final_script_v2": "={{ $json.output }}"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "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": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "final_script",
              "displayName": "final_script",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "final_script_v2",
              "displayName": "final_script_v2",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "video_type",
              "displayName": "video_type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "suggested_duration_minutes",
              "displayName": "suggested_duration_minutes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "keywords",
              "displayName": "keywords",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "hook",
              "displayName": "hook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "unique_angle",
              "displayName": "unique_angle",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "outline_bullets",
              "displayName": "outline_bullets",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "description",
              "displayName": "description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[1]",
              "displayName": "sections[1]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[2]",
              "displayName": "sections[2]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[3]",
              "displayName": "sections[3]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[4]",
              "displayName": "sections[4]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[5]",
              "displayName": "sections[5]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[6]",
              "displayName": "sections[6]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[7]",
              "displayName": "sections[7]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[8]",
              "displayName": "sections[8]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[9]",
              "displayName": "sections[9]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[10]",
              "displayName": "sections[10]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[11]",
              "displayName": "sections[11]",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "sections[12]",
              "displayName": "sections[12]",
              "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": [
        2880,
        608
      ],
      "id": "4f664f14-c2e7-4fee-9204-2ecacc9423ba",
      "name": "Update row in sheet4"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo",
          "mode": "list",
          "cachedResultName": "Nandy Cyber Sucess - YouTube Idea Strategy",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reddit Post Search",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Pctq3oWymuobK4ASgmEpd6j4Unh3N4LH0OxxKnUZtGo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}",
            "STATUS": "=COMPLETE"
          },
          "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
            },
            {
              "id": "DATEVALUE_CURRENT",
              "displayName": "DATEVALUE_CURRENT",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "DATEVALUE_POST",
              "displayName": "DATEVALUE_POST",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "keyword",
              "displayName": "keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "subreddit",
              "displayName": "subreddit",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "selftext",
              "displayName": "selftext",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "author_fullname",
              "displayName": "author_fullname",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "upvotes",
              "displayName": "upvotes",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "upvote ratio",
              "displayName": "upvote ratio",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "comment number",
              "displayName": "comment number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "permalink",
              "displayName": "permalink",
              "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": [
        3120,
        608
      ],
      "id": "e395e2e8-b7fa-4ac3-97ba-336306becc39",
      "name": "Update row in sheet5"
    },
    {
      "parameters": {
        "content": "",
        "height": 192,
        "width": 192,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -16
      ],
      "typeVersion": 1,
      "id": "220a113e-ec94-47da-8e08-a7295a046106",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "3b17afbc-03c6-4a95-a661-5b9667a60f87",
              "leftValue": "={{ $json.STATUS }}",
              "rightValue": "PENDING",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        480,
        224
      ],
      "id": "408e0ea6-4b23-4d70-9705-524a5d220a3a",
      "name": "If1"
    },
    {
      "parameters": {
        "operation": "deactivate",
        "workflowId": {
          "__rl": true,
          "value": "xxsHDWSlM6py0MrB",
          "mode": "list",
          "cachedResultName": "My workflow 10 (#xxsHDWSlM6py0MrB)"
        },
        "requestOptions": {}
      },
      "type": "n8n-nodes-base.n8n",
      "typeVersion": 1,
      "position": [
        704,
        368
      ],
      "id": "942bfe56-1595-4f76-9502-4f2332aac8e2",
      "name": "Deactivate a workflow",
      "credentials": {
        "n8nApi": {
          "id": "LlGjIpY9wHKH4EZL",
          "name": "n8n account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Search for a post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search for a post": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "AI Agent2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet1": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere1": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent2": {
      "main": [
        [
          {
            "node": "Append row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory2": {
      "ai_memory": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet2": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store2": {
      "ai_tool": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere2": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere2": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Vector Store2",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory3": {
      "ai_memory": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model6": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet1": {
      "main": [
        [
          {
            "node": "Update row in sheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store3": {
      "ai_tool": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere3": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store3",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere3": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Vector Store3",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent4": {
      "main": [
        [
          {
            "node": "Update row in sheet3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory4": {
      "ai_memory": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI2": {
      "ai_tool": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "AI Agent4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet3": {
      "main": [
        [
          {
            "node": "AI Agent5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "xAI Grok Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent5": {
      "main": [
        [
          {
            "node": "Update row in sheet4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory5": {
      "ai_memory": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model7": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI3": {
      "ai_tool": [
        [
          {
            "node": "AI Agent5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet4": {
      "main": [
        [
          {
            "node": "Update row in sheet5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deactivate a workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "7178b3f2-21cf-4711-ac5f-0f5bfa14d6b4",
  "meta": {
    "instanceId": "5ff5a5992c4c72af22abbdcfa574d8cdf93dc14d57eb9f66e3d9ef2a3e2dbb6c"
  },
  "id": "epf3llrRRPPfcO2p",
  "tags": []
}