{
  "name": "Generate AI voiceovers from scripts with Gemini TTS and upload to Google Drive",
  "nodes": [
    {
      "id": "b77d0479-251b-4dde-a8db-70dd5c1dcde9",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -656,
        0
      ]
    },
    {
      "id": "420b8504-2cc1-4947-b53d-29fd0ae53d4b",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        592,
        32
      ]
    },
    {
      "id": "3905f225-4b9d-4e47-bda4-b08002ed635b",
      "name": "Read/Write Files from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        784,
        32
      ]
    },
    {
      "id": "88b59cbf-7949-4fb4-84cb-d36a866bbf43",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        32
      ]
    },
    {
      "id": "383050a4-5d1a-4f80-9ac3-8ab99dd6c121",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -64,
        0
      ]
    },
    {
      "id": "8f194775-656e-4687-afbb-507226a8fdb3",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        -272,
        0
      ]
    },
    {
      "id": "be5453fc-c5e8-4591-b7d9-cd5a35b9582a",
      "name": "Getting Video Scripts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -464,
        0
      ]
    },
    {
      "id": "1decede0-d000-4a68-838c-ce708fc49b55",
      "name": "HTTP Request To Generate Voice",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        32
      ]
    },
    {
      "id": "3323cc73-9026-48bd-b951-763101a44280",
      "name": "Extracting fileName",
      "type": "n8n-nodes-base.set",
      "position": [
        960,
        32
      ]
    },
    {
      "id": "648b7a61-af32-43d9-97f1-2189560cc47e",
      "name": "Running FFMPEG Local Code To Change Format Of File",
      "type": "n8n-nodes-base.code",
      "position": [
        1152,
        32
      ]
    },
    {
      "id": "da306259-3612-41bd-99b0-91408c63e400",
      "name": "Running FFMPEG Code",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1328,
        32
      ]
    },
    {
      "id": "2fabed55-983e-4420-b16c-f822697cadfa",
      "name": "Writing File Output Onto Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1520,
        32
      ]
    },
    {
      "id": "bbc88d97-1edb-4430-8749-2df5594c9dcd",
      "name": "Uploading Wav File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1712,
        32
      ]
    },
    {
      "id": "d38711cb-420b-4a70-8ec5-b6df27207caf",
      "name": "Uploading Google Drive Link of File To Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1920,
        32
      ]
    },
    {
      "id": "39ec1f9e-a5be-4e9c-b1cf-aa2f958694d7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -224
      ],
      "parameters": {
        "width": 704,
        "height": 1120,
        "content": "## Generate AI Voiceovers from Scripts and Upload to Google Drive\n\nThis is the final piece of the AI content factory. This workflow takes your text-based video scripts and automatically generates high"
      }
    },
    {
      "id": "1cc5dc7d-55c4-4d0a-b356-a8458169dd96",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        -256
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "**👇 STEP 1: CONNECT TO YOUR SCRIPTS**\n\nThis workflow reads the scripts you generated in Part 2.\n\n**Action Required:**\n1. Connect your Google Sheets account.\n2. Paste the URL of the Google Sheet that w"
      }
    },
    {
      "id": "a7250930-1359-44ad-865f-48c21f641cf9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -192
      ],
      "parameters": {
        "width": 496,
        "height": 176,
        "content": "**🧠 STEP 2: CONFIGURE AI VOICE**\n\nThis node generates the audio using Google Gemini's TTS API.\n\n**Action Required:**\n1.  Go to **Query Parameters** and insert your Gemini API Key.\n2.  (Optional) In th"
      }
    },
    {
      "id": "c53a760c-aaaf-4c39-a564-6b30b8bf52d3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        272
      ],
      "parameters": {
        "width": 432,
        "height": 224,
        "content": "**⚠️ STEP 3: CONFIGURE LOCAL FILE PROCESSING**\n\n**This section is for SELF-HOSTED n8n ONLY and requires FFmpeg to be installed on your machine.**\n\n**Action Required:**\n1.  Click the first **Read/Write"
      }
    },
    {
      "id": "7b792b51-908d-485e-8b9b-7066bf344898",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -192
      ],
      "parameters": {
        "width": 576,
        "height": 192,
        "content": "**✅ STEP 4: SET UPLOAD DESTINATION**\n\nThis node uploads your final `.wav` audio files.\n\n**Action Required:**\n1.  Connect your Google Drive account.\n2.  (Optional) Choose a specific folder to keep your"
      }
    },
    {
      "id": "6ccd0f26-1155-420b-9cad-f140b2d82e13",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        240
      ],
      "parameters": {
        "width": 432,
        "height": 128,
        "content": "**🚀 STEP 5: UPDATE TRACKING SHEET**\n\nThis final step updates your script sheet with links to the new audio files in Google Drive and marks them as \"Yes\" so they don't get processed again."
      }
    }
  ],
  "connections": {
    "Code1": {
      "main": [
        [
          {
            "node": "HTTP Request To Generate Voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Uploading Wav File": {
      "main": [
        [
          {
            "node": "Uploading Google Drive Link of File To Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extracting fileName": {
      "main": [
        [
          {
            "node": "Running FFMPEG Local Code To Change Format Of File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Running FFMPEG Code": {
      "main": [
        [
          {
            "node": "Writing File Output Onto Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Getting Video Scripts": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Extracting fileName",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Writing File Output Onto Disk": {
      "main": [
        [
          {
            "node": "Uploading Wav File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request To Generate Voice": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Getting Video Scripts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Running FFMPEG Local Code To Change Format Of File": {
      "main": [
        [
          {
            "node": "Running FFMPEG Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Uploading Google Drive Link of File To Google Sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}