{
  "name": "bundle.social: Google Drive to Instagram Reels",
  "nodes": [
    {
      "parameters": {
        "content": "## Google Drive to Instagram Reels\n\nEvery new video in a Google Drive folder is uploaded to bundle.social and published on Instagram Reels right away. Other file types are skipped.\n\n**Setup**\n1. Install the community node **n8n-nodes-bundlesocial** (Settings > Community Nodes) on self-hosted n8n.\n2. Add a **bundle.social API** credential with a key from bundle.social > Organization > API Keys, and a Google Drive credential.\n3. In **New file in Drive folder**, pick the folder to watch.\n4. In **Create post**, pick the team that has the Instagram account connected.\n5. Activate the workflow. The caption is the file name without its extension; edit it in **Create post**.",
        "height": 360,
        "width": 440,
        "color": 4
      },
      "id": "058e0902-d3ad-5302-b318-bcaac743d8a0",
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -560,
        -200
      ]
    },
    {
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "id": "e3322e54-4113-556d-8543-378ddb59faae",
      "name": "New file in Drive folder",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "824c11ad-3de5-57a8-b2b2-20ef2de2d384",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              },
              "leftValue": "={{ $json.mimeType }}",
              "rightValue": "video/"
            }
          ]
        }
      },
      "id": "e4f91c73-9773-5f1a-8f40-a67c53d53268",
      "name": "Only videos",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {}
      },
      "id": "ca7f7395-a14a-577c-8c95-fa9abe8a881c",
      "name": "Download file",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        480,
        0
      ]
    },
    {
      "parameters": {
        "resource": "upload",
        "operation": "uploadLargeFile",
        "binaryPropertyName": "data",
        "additionalFields": {}
      },
      "id": "a9d849c5-e235-560f-b905-bd5d8501b855",
      "name": "Upload to bundle.social",
      "type": "n8n-nodes-bundlesocial.bundleSocial",
      "typeVersion": 1,
      "position": [
        720,
        0
      ]
    },
    {
      "parameters": {
        "resource": "post",
        "operation": "create",
        "teamId": "",
        "title": "={{ $('New file in Drive folder').item.json.name.replace(/\\.[^.]+$/, '') }}",
        "postDate": "={{ $now.toISO() }}",
        "status": "SCHEDULED",
        "socialAccountTypes": [
          "INSTAGRAM"
        ],
        "dataInstagram": {
          "type": "REEL",
          "text": "={{ $('New file in Drive folder').item.json.name.replace(/\\.[^.]+$/, '') }}",
          "uploadIds": "={{ $json.id }}"
        }
      },
      "id": "6931dc69-03a0-58bf-9faa-2ac7ac58fece",
      "name": "Create post",
      "type": "n8n-nodes-bundlesocial.bundleSocial",
      "typeVersion": 1,
      "position": [
        960,
        0
      ]
    }
  ],
  "connections": {
    "New file in Drive folder": {
      "main": [
        [
          {
            "node": "Only videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only videos": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Upload to bundle.social",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to bundle.social": {
      "main": [
        [
          {
            "node": "Create post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}