{
  "name": "Automated PDF report downloader & organizer with Google Drive & Sheets",
  "nodes": [
    {
      "id": "29309be7-f23d-4747-9b5b-01c6154ff55a",
      "name": "Sticky Note - Introduction",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -16
      ],
      "parameters": {
        "width": 616,
        "height": 592,
        "content": "## PDF Research Report Collector & Processor\n\nAutomatically download PDFs from discovered URLs, upload to Google Drive, and track metadata.\n\n## How it works:\n1. **Read PDF URLs** → Get pending PDFs fr"
      }
    },
    {
      "id": "b9f3962f-d4ed-4352-a2eb-e5c24cd5a110",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        48,
        0
      ]
    },
    {
      "id": "47f4dd5b-2adc-4f0f-9cbd-cd31c78635ba",
      "name": "Schedule (Every 12 Hours)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        32,
        240
      ]
    },
    {
      "id": "77d0c109-cfe0-421f-ab0b-77da9f5b0c20",
      "name": "Called by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        32,
        448
      ]
    },
    {
      "id": "fcd36d1f-613e-4448-a343-e6c1e8ddb1aa",
      "name": "Read Pending PDF URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        240
      ]
    },
    {
      "id": "e3ad7ecf-65e7-4fdc-9445-129ff8d461fe",
      "name": "Loop Over PDFs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        656,
        336
      ]
    },
    {
      "id": "fc9f12ae-00e0-4b97-8dd7-3c41da23d6a6",
      "name": "Prepare Download Info",
      "type": "n8n-nodes-base.code",
      "position": [
        896,
        352
      ]
    },
    {
      "id": "d5a40004-4b38-4aea-9ade-743c9dfda063",
      "name": "Is Valid URL?",
      "type": "n8n-nodes-base.if",
      "position": [
        1136,
        352
      ]
    },
    {
      "id": "a83b06dd-48ed-4c6b-a238-53796d4b82f7",
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1440,
        80
      ]
    },
    {
      "id": "6bf86e24-9628-4577-8890-7b43267fbc05",
      "name": "Download Success?",
      "type": "n8n-nodes-base.if",
      "position": [
        1664,
        80
      ]
    },
    {
      "id": "b38fd492-657a-463d-ba1f-a7089669aaf2",
      "name": "Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2192,
        64
      ]
    },
    {
      "id": "ade19256-0bc7-4f75-86f8-dbbcd381d880",
      "name": "Extract File Metadata",
      "type": "n8n-nodes-base.code",
      "position": [
        2416,
        64
      ]
    },
    {
      "id": "f68461c6-90d9-424b-bd10-d4f1b0d47995",
      "name": "Mark as Failed",
      "type": "n8n-nodes-base.set",
      "position": [
        1888,
        176
      ]
    },
    {
      "id": "093eb8ab-6d40-42d0-b76f-2a5dc7208d5f",
      "name": "Mark as Invalid",
      "type": "n8n-nodes-base.set",
      "position": [
        1888,
        368
      ]
    },
    {
      "id": "d8b68d65-8d3a-46e1-aca4-41b4e7ff161b",
      "name": "Save to PDF Library",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2640,
        64
      ]
    },
    {
      "id": "d037741f-44fe-4966-b946-eb1b6168c73d",
      "name": "Update Source Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2640,
        352
      ]
    },
    {
      "id": "456cdecf-2595-40c4-85c2-e5986d3af2ae",
      "name": "Log Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2192,
        272
      ]
    },
    {
      "id": "b34cfab8-f1a1-46bf-b937-062fa5610921",
      "name": "Completion Summary",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        144
      ]
    },
    {
      "id": "31591f02-59cd-4aa5-b28f-a3892d3cf250",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        -16
      ],
      "parameters": {
        "width": 720,
        "height": 576,
        "content": "## Save PDF to Drive and Log in Google Sheet"
      }
    },
    {
      "id": "bfdcfc23-e5d5-42f5-99c4-d20dfac705ac",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -16
      ],
      "parameters": {
        "width": 496,
        "height": 576,
        "content": "## Validate the Downloaded PDF"
      }
    },
    {
      "id": "14fff295-df64-4b51-859d-ead8b8934702",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -16
      ],
      "parameters": {
        "width": 496,
        "height": 576,
        "content": "## Validate URL and Downloaded PDF"
      }
    },
    {
      "id": "fa06b8c5-8f72-4182-9da9-fe407b6878e9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -16
      ],
      "parameters": {
        "width": 256,
        "height": 576,
        "content": "## Read PDF URLs"
      }
    }
  ],
  "connections": {
    "Log Error": {
      "main": [
        [
          {
            "node": "Update Source Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download PDF": {
      "main": [
        [
          {
            "node": "Download Success?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Valid URL?": {
      "main": [
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark as Invalid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over PDFs": {
      "main": [
        [
          {
            "node": "Completion Summary",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Download Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Read Pending PDF URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Failed": {
      "main": [
        [
          {
            "node": "Log Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Invalid": {
      "main": [
        [
          {
            "node": "Log Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Success?": {
      "main": [
        [
          {
            "node": "Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark as Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to PDF Library": {
      "main": [
        [
          {
            "node": "Update Source Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Source Status": {
      "main": [
        [
          {
            "node": "Loop Over PDFs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract File Metadata": {
      "main": [
        [
          {
            "node": "Save to PDF Library",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Download Info": {
      "main": [
        [
          {
            "node": "Is Valid URL?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Pending PDF URLs": {
      "main": [
        [
          {
            "node": "Loop Over PDFs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Google Drive": {
      "main": [
        [
          {
            "node": "Extract File Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule (Every 12 Hours)": {
      "main": [
        [
          {
            "node": "Read Pending PDF URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Called by Another Workflow": {
      "main": [
        [
          {
            "node": "Read Pending PDF URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}