{
  "name": "Sheet → Instagram Carousel (Orshot)",
  "nodes": [
    {
      "parameters": {
        "pollTimes": { "item": [{ "mode": "everyMinute" }] },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit"
        },
        "sheetName": { "__rl": true, "mode": "name", "value": "Sheet1" },
        "event": "rowAdded",
        "options": {}
      },
      "id": "b2c0e000-0000-4000-8000-000000000001",
      "name": "Watch Content Calendar",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [-160, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.orshot.com/v1/studio/render",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_ORSHOT_API_KEY" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"templateId\": 12372,\n  \"modifications\": {\n    \"page1@hook_line1\": \"{{ $json.hook_line1 }}\",\n    \"page1@hook_circled\": \"{{ $json.hook_circled }}\",\n    \"page1@strip_text\": \"{{ $json.strip_text }}\",\n    \"page1@bg_image\": \"{{ $json.cover_image }}\",\n    \"page2@note_text\": \"{{ $json.note1 }}\",\n    \"page2@subtitle\": \"{{ $json.note1_subtitle }}\",\n    \"page2@bg_image\": \"{{ $json.note1_image }}\",\n    \"page3@note_text\": \"{{ $json.note2 }}\",\n    \"page3@subtitle\": \"{{ $json.note2_subtitle }}\",\n    \"page3@bg_image\": \"{{ $json.note2_image }}\",\n    \"page4@note_text\": \"{{ $json.note3 }}\",\n    \"page4@subtitle\": \"{{ $json.note3_subtitle }}\",\n    \"page4@bg_image\": \"{{ $json.note3_image }}\"\n  },\n  \"response\": { \"type\": \"url\", \"format\": \"png\" },\n  \"publish\": {\n    \"accounts\": [0],\n    \"content\": \"{{ $json.caption }}\"\n  }\n}",
        "options": {}
      },
      "id": "b2c0e000-0000-4000-8000-000000000002",
      "name": "Render Carousel + Publish",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [120, 180],
      "notes": "Replace YOUR_ORSHOT_API_KEY, swap templateId 12372 for your own template's ID (shown in the studio URL), and set publish.accounts to your Instagram Account ID (Orshot → Social Accounts → Copy ID). Leaving accounts as [0] means nothing gets posted, so you can test safely."
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.orshot.com/v1/studio/render",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_ORSHOT_API_KEY" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"templateId\": 12372,\n  \"modifications\": {\n    \"page1@hook_line1\": \"{{ $json.hook_line1 }}\",\n    \"page1@hook_circled\": \"{{ $json.hook_circled }}\",\n    \"page1@strip_text\": \"{{ $json.strip_text }}\",\n    \"page1@bg_image\": \"{{ $json.cover_image }}\",\n    \"page2@note_text\": \"{{ $json.note1 }}\",\n    \"page2@subtitle\": \"{{ $json.note1_subtitle }}\",\n    \"page2@bg_image\": \"{{ $json.note1_image }}\",\n    \"page3@note_text\": \"{{ $json.note2 }}\",\n    \"page3@subtitle\": \"{{ $json.note2_subtitle }}\",\n    \"page3@bg_image\": \"{{ $json.note2_image }}\",\n    \"page4@note_text\": \"{{ $json.note3 }}\",\n    \"page4@subtitle\": \"{{ $json.note3_subtitle }}\",\n    \"page4@bg_image\": \"{{ $json.note3_image }}\"\n  },\n  \"response\": { \"type\": \"url\", \"format\": \"mp4\" },\n  \"videoOptions\": {\n    \"combinePages\": true,\n    \"pageTransition\": \"fade\",\n    \"pageTransitionDuration\": 0.4\n  }\n}",
        "options": {}
      },
      "id": "b2c0e000-0000-4000-8000-000000000003",
      "name": "Render Combined Reel (optional)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [120, 420],
      "disabled": true,
      "notes": "Optional: renders ONE video of all 4 pages (animations + fade transitions). Enable this node if you also want a reel from the same row."
    }
  ],
  "connections": {
    "Watch Content Calendar": {
      "main": [
        [
          { "node": "Render Carousel + Publish", "type": "main", "index": 0 },
          { "node": "Render Combined Reel (optional)", "type": "main", "index": 0 }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" }
}
