{
  "id": "ceqHmtH7kMQI1jwl",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "IG Auto Caption Agent Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "39220e6f-5631-4bb4-90df-24784ef3a3e3",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -16,
        0
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "<<<GOOGLE_DRIVE_FOLDER_ID>>>",
          "cachedResultUrl": "<<<REDACTED_URL>>>",
          "cachedResultName": "<<<GOOGLE_DRIVE_FOLDER_NAME>>>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2579313d-5b23-4023-b762-395de0f41c79",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        496,
        0
      ],
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "7e338ce1-56b8-4e00-9e2c-2014ebf072a3",
      "name": "Post to Submagic",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        0
      ],
      "parameters": {
        "url": "https://api.submagic.co/v1/projects",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "title",
              "value": "My First Video"
            },
            {
              "name": "language",
              "value": "en"
            },
            {
              "name": "videoUrl",
              "value": "={{ $json.webViewLink }}"
            },
            {
              "name": "templateName",
              "value": "Hormozi 2"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "1feab281-5f2a-4239-aa55-ae010b600dc3",
      "name": "Get Captioned Video from Submagic",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        656,
        0
      ],
      "parameters": {
        "url": "=https://api.submagic.co/v1/projects/{{ $json.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "baa828d3-a48f-4b61-b86c-a1ea197f0f61",
      "name": "Download Captioned Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1088,
        -16
      ],
      "parameters": {
        "url": "={{ $json.downloadUrl }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "8e4eaf50-5a27-4dee-a02b-90150ea86246",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -320
      ],
      "parameters": {
        "width": 640,
        "height": 832,
        "content": "🎥 Auto-Caption Videos for Instagram with Google Drive + Submagic\n\nDescription\nSave hours on video editing with this workflow! Whenever you upload a video to a specific Google Drive folder, it’s automatically sent to Submagic to generate engaging captions (using your chosen template). Once the captioned video is ready, it’s pulled back, downloaded, and uploaded into your Google Drive—fully captioned and Instagram-ready.\n\nWatch build along videos for workflows like these on: www.youtube.com/@automatewithmarc\n\nHow It Works\n\nGoogle Drive Trigger – Listens for new video uploads in your chosen folder.\n\nPost to Submagic – Sends the video URL to Submagic’s API with your caption style (e.g. Hormozi).\n\nWait Loop + Status Check – Polls Submagic until the captioning job is complete.\n\nDownload Captioned Video – Retrieves the finished captioned video file.\n\nUpload to Google Drive – Saves the captioned version back into Drive, ready for Instagram posting.\n\nWhy You’ll Love It\n\n🎯 Zero manual steps — captioning happens automatically.\n\n⚡ Faster IG content pipeline — ready-to-post reels in minutes.\n\n🎨 Consistent style — apply your favorite Submagic caption templates every time.\n\n☁️ Cloud-first — works entirely with Google Drive + Submagic, no local processing needed.\n\nRequirements\n\nGoogle Drive account (with OAuth credentials)\n\nSubmagic API key\n\nn8n (Cloud or self-hosted)"
      },
      "typeVersion": 1
    },
    {
      "id": "6ad62e6e-1a14-4ef2-ba97-d16d257625f8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -144
      ],
      "parameters": {
        "color": 4,
        "width": 272,
        "height": 576,
        "content": "Google Drive Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "7253b25d-7085-4700-88bd-022f883af265",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -144
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 576,
        "content": "Post to Submagic for Caption"
      },
      "typeVersion": 1
    },
    {
      "id": "fe22f0ad-b2aa-4e7d-8bc3-82ced985b159",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -144
      ],
      "parameters": {
        "color": 5,
        "width": 528,
        "height": 576,
        "content": "Wait Loop & Get Captioned Video"
      },
      "typeVersion": 1
    },
    {
      "id": "07bf2250-ae19-42fe-b1c7-fb05d868bae2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        -144
      ],
      "parameters": {
        "color": 6,
        "height": 576,
        "content": "Download Captioned Video"
      },
      "typeVersion": 1
    },
    {
      "id": "98d77f85-31c3-4690-8667-cdcea179a5b8",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        -144
      ],
      "parameters": {
        "color": 7,
        "height": 576,
        "content": "Upload Captioned Video to Drive"
      },
      "typeVersion": 1
    },
    {
      "id": "a2debc5f-46eb-4c02-8575-5b34453a8265",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        832,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f7ec8156-39d4-4e6e-9455-5c6dd6702c8f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b4cc46da-588d-4019-9c9f-e8204443ca89",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        768,
        192
      ],
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "2163581f-e8ef-4ccb-8f5a-7c9f747ff446",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1344,
        -16
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "<<<GOOGLE_DRIVE_NAME>>>"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "<<<GOOGLE_DRIVE_FOLDER_ID>>>",
          "cachedResultName": "<<<GOOGLE_DRIVE_FOLDER_NAME>>>"
        }
      },
      "typeVersion": 3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Download Captioned Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Captioned Video from Submagic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get Captioned Video from Submagic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        []
      ]
    },
    "Post to Submagic": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Post to Submagic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Captioned Video": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Captioned Video from Submagic": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}