{
  "name": "Generate & track invoices with Google Drive, PDF Converter & Gmail",
  "nodes": [
    {
      "id": "9d642cd1-88d1-4bc2-9ef6-2b570db71ce5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        -784
      ],
      "parameters": {
        "width": 400,
        "height": 796,
        "content": "## How it works\n\nThis workflow generates professional invoices instantly when triggered by payment gateways, CRM systems, or forms. It validates invoice data, auto-generates unique invoice numbers, ca"
      }
    },
    {
      "id": "c14e603f-a354-4d88-acf1-9add2a915a6c",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -944,
        -80
      ]
    },
    {
      "id": "7d53dd09-7f7f-4d00-8d13-f53892f61223",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -240
      ],
      "parameters": {
        "width": 588,
        "height": 384,
        "content": "## Data Processing\n\nReceives invoice data, validates required fields, auto-generates invoice numbers, calculates line items/subtotals/taxes, adds company branding and bank details, then creates profes"
      }
    },
    {
      "id": "969158b3-3974-4206-a232-f52304683a09",
      "name": "Validate Invoice Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -784,
        -32
      ]
    },
    {
      "id": "92f92526-75c7-47c9-9183-39a9a5de3735",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -320
      ],
      "parameters": {
        "width": 424,
        "height": 496,
        "content": "## Smart Notifications\n\nRoutes Slack alerts based on payment status. Paid invoices get success notifications. Unpaid/partial invoices get reminders with due dates, enabling accounting team to prioriti"
      }
    },
    {
      "id": "2624ead6-7e79-4b13-80ba-0a753d39d17b",
      "name": "Enrich with Company Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -624,
        -80
      ]
    },
    {
      "id": "232fc78f-fbfd-444e-9a8a-ee9639d9e10d",
      "name": "Generate Invoice HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        -432,
        -80
      ]
    },
    {
      "id": "88557c37-4406-49ea-92fb-1f96d7127f8d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -272
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## PDF & Storage\n\nConverts HTML to print-ready PDF with preserved formatting, then archives to Google Drive with descriptive filename for searchability, compliance, and easy sharing."
      }
    },
    {
      "id": "fa21eb40-1c81-4c0c-8517-6b3305ba136f",
      "name": "HTML to PDF",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        -256,
        -80
      ]
    },
    {
      "id": "268db052-2990-4760-8cc0-457aa25b3fdc",
      "name": "Save to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -96,
        -80
      ]
    },
    {
      "id": "f1e750d4-15f7-4b59-8b9c-33e252677333",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -288
      ],
      "parameters": {
        "width": 280,
        "height": 368,
        "content": "## Customer Delivery\n\nEmails invoice PDF to customer with payment instructions, bank details, and due date reminder. Instant delivery improves cash flow by reducing payment delays."
      }
    },
    {
      "id": "eaa80439-09ea-4ccc-91b1-030cc0b1e149",
      "name": "Is Payment Received?",
      "type": "n8n-nodes-base.if",
      "position": [
        432,
        -80
      ]
    },
    {
      "id": "f05925be-b9d1-428b-8e0a-a55c29854209",
      "name": "Notify Team - Paid",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        656,
        -176
      ]
    },
    {
      "id": "bed6dcd1-1c79-4fa9-8ac3-7f65e6168505",
      "name": "Notify Team - Unpaid",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        656,
        32
      ]
    },
    {
      "id": "3d20247f-67bf-40de-a517-591f63408bcd",
      "name": "Send to Customer",
      "type": "n8n-nodes-base.gmail",
      "position": [
        144,
        -80
      ]
    }
  ],
  "connections": {
    "HTML to PDF": {
      "main": [
        [
          {
            "node": "Save to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Validate Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to Customer": {
      "main": [
        [
          {
            "node": "Is Payment Received?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Payment Received?": {
      "main": [
        [
          {
            "node": "Notify Team - Paid",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Team - Unpaid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Drive": {
      "main": [
        [
          {
            "node": "Send to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Invoice HTML": {
      "main": [
        [
          {
            "node": "HTML to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Invoice Data": {
      "main": [
        [
          {
            "node": "Enrich with Company Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich with Company Data": {
      "main": [
        [
          {
            "node": "Generate Invoice HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}