AutomationFlowsWeb Scraping › Export PDF Invoices From Smartbill to Google Drive

Export PDF Invoices From Smartbill to Google Drive

ByCodez & AI @codez on n8n.io

This workflow automates the retrieval of invoice PDFs from the Smartbill API and saves them to Google Drive in a dynamically created folder based on last month’s date. It also generates a range of invoice numbers, ensuring proper formatting, and uploads each PDF with a…

Event trigger★★★★☆ complexity15 nodesHTTP RequestGoogle Drive
Web Scraping Trigger: Event Nodes: 15 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #2887 — we link there as the canonical source.

This workflow follows the Google Drive → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "119111b6-92a8-4a54-8830-2a12a0d4eec8",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -580,
        -60
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bf0767db-8dd2-4f83-a27f-37c1160916d4",
      "name": "Smartbill get invoice pdf",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1640,
        -60
      ],
      "parameters": {},
      "typeVersion": 4.1
    },
    {
      "id": "f8bd05d5-0d7e-4db8-9f07-070e4d48af3b",
      "name": "SetData",
      "type": "n8n-nodes-base.set",
      "position": [
        -300,
        -60
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "57999d68-71d4-4d3c-968a-50c1f20cb010",
      "name": "Set mime",
      "type": "n8n-nodes-base.code",
      "position": [
        1900,
        -60
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "61771345-4562-4c4b-b00d-db8fb0b80f1e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -180
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d3d8feb2-cda6-4c78-b96c-7c8938b23bb7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -520
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ee617dbb-effb-4671-b23b-152058edd76f",
      "name": "Set Default Folder Name",
      "type": "n8n-nodes-base.code",
      "position": [
        -20,
        -60
      ],
      "parameters": {},
      "notesInFlow": false,
      "typeVersion": 2
    },
    {
      "id": "15da1268-7ea0-444a-ac79-3d6ec0057b80",
      "name": "Search Drive Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        200,
        -60
      ],
      "parameters": {},
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "d63071eb-ca34-4eb7-8da1-5c8172f4f7fe",
      "name": "If exists",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        -60
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "7cec08c1-737e-4178-92ea-11914821e2ef",
      "name": "Create Drive Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        680,
        80
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "78532c10-0c70-4c8c-9b93-bdcb3e80dbce",
      "name": "Set the loop",
      "type": "n8n-nodes-base.code",
      "position": [
        1160,
        -60
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "93bc581c-0624-4fdd-ba06-e0ff3836ea53",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1380,
        -60
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "40d272e8-458f-4946-916e-4eaf9960d4f0",
      "name": "Upload file to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2140,
        -60
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "08d5a34a-3e6c-4bfd-bc3e-0cbfedf9d715",
      "name": "Wait a sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        2380,
        -40
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "a1dca3c1-b9ce-443b-b942-908ab10c1610",
      "name": "Set Folder ID",
      "type": "n8n-nodes-base.set",
      "position": [
        920,
        -60
      ],
      "parameters": {},
      "typeVersion": 3.4
    }
  ],
  "connections": {
    "SetData": {
      "main": [
        [
          {
            "node": "Set Default Folder Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set mime": {
      "main": [
        [
          {
            "node": "Upload file to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If exists": {
      "main": [
        [
          {
            "node": "Set Folder ID",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Drive Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait a sec": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the loop": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Folder ID": {
      "main": [
        [
          {
            "node": "Set the loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Smartbill get invoice pdf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Drive Folder": {
      "main": [
        [
          {
            "node": "Set Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Drive Folder": {
      "main": [
        [
          {
            "node": "If exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Default Folder Name": {
      "main": [
        [
          {
            "node": "Search Drive Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Smartbill get invoice pdf": {
      "main": [
        [
          {
            "node": "Set mime",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file to Google Drive": {
      "main": [
        [
          {
            "node": "Wait a sec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "SetData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates the retrieval of invoice PDFs from the Smartbill API and saves them to Google Drive in a dynamically created folder based on last month’s date. It also generates a range of invoice numbers, ensuring proper formatting, and uploads each PDF with a…

Source: https://n8n.io/workflows/2887/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This automation organizes your n8n workflows files into categorizes (Active, Template, Done, Archived) and uploads them directly to a categorized Google Drive folders. It is designed to help users man

Google Drive, HTTP Request, Time Saved
Web Scraping

This automation organizes and consolidates your n8n workflows into categorized JSON files (Active, Template, Done, Archived) and uploads them directly to a Google Drive folder. It is designed to help

Google Drive, Time Saved, HTTP Request
Web Scraping

The Sora 2 API allows seamless generation of CGI ads, turning text prompts into stunning videos. This workflow automates the entire process from video generation to upload, notification, and file shar

Form Trigger, HTTP Request, Email Send +1
Web Scraping

Formtrigger Workflow. Uses formTrigger, googleDrive, httpRequest, stopAndError. Event-driven trigger; 28 nodes.

Form Trigger, Google Drive, HTTP Request +1
Web Scraping

Formtrigger Workflow. Uses formTrigger, googleDrive, httpRequest, stopAndError. Event-driven trigger; 28 nodes.

Form Trigger, Google Drive, HTTP Request +1