AutomationFlowsData & Sheets › Extract Invoice Data From Google Drive to Sheets Using Pdf.co AI Parser

Extract Invoice Data From Google Drive to Sheets Using Pdf.co AI Parser

ByRobert Breen @rbreen on n8n.io

This workflow looks inside a Google Drive folder, parses each PDF invoice with PDF.co’s AI Invoice Parser, and appends vendor, amount, dates, and a link to the file into a Google Sheet. In n8n → Credentials → New → Google Drive (OAuth2) Sign in to the Google account that owns…

Event trigger★★★★☆ complexity12 nodesGoogle DriveN8N Nodes PdfcoGoogle Sheets
Data & Sheets Trigger: Event Nodes: 12 Complexity: ★★★★☆ Added:

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

This workflow follows the Google Drive → Google Sheets 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": "ab1b7d2d-7eac-45eb-9e0a-36f14c56df14",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -768,
        1856
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "869b9f99-2c91-48c8-bb9e-2f449fb8039a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        1056
      ],
      "parameters": {
        "width": 400,
        "height": 1472,
        "content": "\n## \u2699\ufe0f Setup Instructions\n\n### 1) Connect Google Drive (OAuth2)\n1. In **n8n \u2192 Credentials \u2192 New \u2192 Google Drive (OAuth2)**  \n2. Sign in to the Google account that owns your invoice PDFs and **allow access**.  \n3. In the **Get Parent Folder ID** node, set your search to the folder name (e.g., `n8n Invoices`).  \n4. In **Get Invoice ID\u2019s**, ensure **Filter \u2192 folderId** uses the ID from the previous node (already wired in this template).\n\n---\n\n### 2) Connect PDF.co (AI Invoice Parser)\n1. Create a **PDF.co** account and copy your **API Key**.  \n2. In **n8n \u2192 Credentials \u2192 New \u2192 PDF.co API**, paste your key and **Save**.  \n3. In the **AI Invoice Parser** node, keep **URL** mapped to the Drive link coming from **Convert to URL**. The node is already set to use your PDF.co credentials.\n\n\n---\n\n### 3) Connect Google Sheets (OAuth2)\n1. In **n8n \u2192 Credentials \u2192 New \u2192 Google Sheets (OAuth2)**  \n2. Log in with your Google account and **grant access**.  \n3. In the **Store Data in Google Sheets** node, select your **Spreadsheet** and **Sheet** (this template is set to:  \n   - Spreadsheet: `Invoice Template` (`1a6QBIQkr7RsZtUZBi87NwhwgTbnr5hQl4J_ZOkr3F1U`)  \n   - Tab: `Due` (gid: `1002294955`)  \n4. The node is configured to **Append or Update** by `Url` so repeats won\u2019t duplicate.\n\n**Expected columns on the `Due` tab:**\n- `Url` (Drive link we generated)\n- `Vendor`\n- `Invoice Date`\n- `Total`\n- `Due Date`\n\n---\n\n\n\n## \ud83d\udcec Contact\nNeed help customizing this (e.g., auto-sharing Drive links, enriching the Sheet, or pushing to Slack/Email)?\n\n- \ud83d\udce7 **robert@ynteractive.com**  \n- \ud83d\udd17 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)**  \n- \ud83c\udf10 **[ynteractive.com](https://ynteractive.com)**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6ec9845b-306b-456a-8831-0142e780db1a",
      "name": "Sticky Note55",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        1056
      ],
      "parameters": {
        "color": 7,
        "width": 1744,
        "height": 1472,
        "content": "# \ud83d\udcc4 Google Drive \u2192 AI Invoice Parser \u2192 Google Sheets (Due Log)\n\nThis workflow looks inside a **Google Drive folder**, parses each PDF invoice with **PDF.co\u2019s AI Invoice Parser**, and appends vendor, amount, dates, and a link to the file into a **Google Sheet**.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7750adf2-b5bd-4ed0-bf54-06b3b7878f5b",
      "name": "Get Parent Folder ID",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -560,
        1952
      ],
      "parameters": {
        "filter": {},
        "options": {},
        "resource": "fileFolder",
        "queryString": "n8n Invoices"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "5950e187-899f-4cd5-857b-ceb0bd5637f2",
      "name": "Get Invoice ID's",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -336,
        1632
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.id }}"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "queryString": "="
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "1c9d75d1-84b0-4d78-99d6-c3bc8647405d",
      "name": "Convert to URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -128,
        1824
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e7c4006d-b799-480d-a594-d7f72be006e4",
              "name": "link",
              "type": "string",
              "value": "=https://drive.google.com/file/d/{{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "44cc62d6-1764-4b6c-91c9-c0bd11e4bb37",
      "name": "AI Invoice Parser",
      "type": "n8n-nodes-pdfco.PDFco Api",
      "position": [
        96,
        2128
      ],
      "parameters": {
        "url": "={{ $json.link }}",
        "advancedOptions": {}
      },
      "credentials": {
        "pdfcoApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "eeb6adb8-e18e-4589-802b-3545d4e1c845",
      "name": "Set Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        288,
        1632
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8544df44-2d59-475a-9080-75a2e59eb8df",
              "name": "Vendor",
              "type": "string",
              "value": "={{ $json.body.vendor.name }}"
            },
            {
              "id": "a3c4fab9-d62e-453b-be59-32d81d085c45",
              "name": "Invoice Date",
              "type": "string",
              "value": "={{ $json.body.invoice.invoiceDate }}"
            },
            {
              "id": "03dd461f-0fcc-466d-91c1-575f9f0157d1",
              "name": "Total",
              "type": "string",
              "value": "={{ $json.body.paymentDetails.total }}"
            },
            {
              "id": "d1ae2dc1-4e5a-40c1-9553-59b6394a3aca",
              "name": "Due Date",
              "type": "string",
              "value": "={{ $json.body.paymentDetails.dueDate }}"
            },
            {
              "id": "823e5828-ed31-4b03-995a-55cd53bd8e22",
              "name": "url",
              "type": "string",
              "value": "={{ $('Convert to URL').item.json.link }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a40f5ff5-c723-459b-8a4f-0e0affa19204",
      "name": "Store Data in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        576,
        2160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Url": "={{ $json.url }}",
            "Total": "={{ $json.Total }}",
            "Vendor": "={{ $json.Vendor }}",
            "Due Date": "={{ $json['Due Date'] }}",
            "Invoice Date": "={{ $json['Invoice Date'] }}"
          },
          "schema": [
            {
              "id": "Vendor",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Vendor",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Invoice Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Invoice Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Total",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Total",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Due Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Due Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Url"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1002294955,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1a6QBIQkr7RsZtUZBi87NwhwgTbnr5hQl4J_ZOkr3F1U/edit#gid=1002294955",
          "cachedResultName": "Due"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1a6QBIQkr7RsZtUZBi87NwhwgTbnr5hQl4J_ZOkr3F1U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1a6QBIQkr7RsZtUZBi87NwhwgTbnr5hQl4J_ZOkr3F1U/edit?usp=drivesdk",
          "cachedResultName": "Invoice Template"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "26a8becd-467b-4fad-9700-296a137f17f0",
      "name": "Sticky Note61",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        1632
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 688,
        "content": "### 3) Connect Google Sheets (OAuth2)\n1. In **n8n \u2192 Credentials \u2192 New \u2192 Google Sheets (OAuth2)**  \n2. Log in with your Google account and **grant access**.  \n3. In the **Store Data in Google Sheets** node, select your **Spreadsheet** and **Sheet** (this template is set to:  \n   - Spreadsheet: `Invoice Template` (`1a6QBIQkr7RsZtUZBi87NwhwgTbnr5hQl4J_ZOkr3F1U`)  \n   - Tab: `Due` (gid: `1002294955`)  \n4. The node is configured to **Append or Update** by `Url` so repeats won\u2019t duplicate.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e6420fe8-afa6-4861-aa2c-2c471de718e1",
      "name": "Sticky Note62",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        1552
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 544,
        "content": "### 1) Connect Google Drive (OAuth2)\n1. In **n8n \u2192 Credentials \u2192 New \u2192 Google Drive (OAuth2)**  \n2. Sign in to the Google account that owns your invoice PDFs and **allow access**.  \n3. In the **Get Parent Folder ID** node, set your search to the folder name (e.g., `n8n Invoices`).  \n4. In **Get Invoice ID\u2019s**, ensure **Filter \u2192 folderId** uses the ID from the previous node (already wired in this template)."
      },
      "typeVersion": 1
    },
    {
      "id": "3accccf6-0a7c-44e2-863b-e7a7a61a7115",
      "name": "Sticky Note64",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        1808
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 464,
        "content": "### 2) Connect PDF.co (AI Invoice Parser)\n1. Create a **PDF.co** account and copy your **API Key**.  \n2. In **n8n \u2192 Credentials \u2192 New \u2192 PDF.co API**, paste your key and **Save**.  \n3. In the **AI Invoice Parser** node, keep **URL** mapped to the Drive link coming from **Convert to URL**. The node is already set to use your PDF.co credentials.\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Set Fields": {
      "main": [
        [
          {
            "node": "Store Data in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to URL": {
      "main": [
        [
          {
            "node": "AI Invoice Parser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invoice ID's": {
      "main": [
        [
          {
            "node": "Convert to URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Invoice Parser": {
      "main": [
        [
          {
            "node": "Set Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Parent Folder ID": {
      "main": [
        [
          {
            "node": "Get Invoice ID's",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Data in Google Sheets": {
      "main": [
        []
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get Parent Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

This workflow looks inside a Google Drive folder, parses each PDF invoice with PDF.co’s AI Invoice Parser, and appends vendor, amount, dates, and a link to the file into a Google Sheet. In n8n → Credentials → New → Google Drive (OAuth2) Sign in to the Google account that owns…

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

More Data & Sheets workflows → · Browse all categories →

Related workflows

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

Data & Sheets

PCN. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 60 nodes.

Google Sheets, HTTP Request, @N Octo N/N8N Nodes Json Database +3
Data & Sheets

The workflow automates the process of gathering extensive keyword data for a "Main Keyword." It starts by reading initial parameters from a Google Sheets template, creates a new dedicated Google Sheet

Google Sheets, Google Drive, HTTP Request
Data & Sheets

🔥 March Sale – n8n Community Members Get ideoGener8r for Just $27! (Reg. $47) Use Coupon Code: (Valid until 3/31/2025 for n8n community members)

HTTP Request, Google Drive, Google Sheets
Data & Sheets

📄 Documentation: Notion Guide

Google Sheets, Google Drive, HTTP Request +2
Data & Sheets

Overview

Google Sheets, Google Drive, HTTP Request