{
  "name": "Generate custom branded PDF invoices from QuickBooks and email to clients",
  "nodes": [
    {
      "id": "2cad3d04-ad08-4864-a075-e44cdc02b09e",
      "name": "Listen for New QuickBooks Invoice",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1152,
        736
      ]
    },
    {
      "id": "37d547c9-199e-4b06-837d-02f5701eab29",
      "name": "Get Invoice Data from QuickBooks",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1888,
        464
      ]
    },
    {
      "id": "63323be0-c313-4a0b-8643-0deb3ffab064",
      "name": "Fetch Company Logo Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1520,
        736
      ]
    },
    {
      "id": "9b1b4f77-7efa-4181-a619-31c93b2dccb0",
      "name": "Fetch Company Signature Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1520,
        1088
      ]
    },
    {
      "id": "e1c91533-ab5e-4e26-92b7-f9339892c441",
      "name": "Convert Logo to Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1888,
        736
      ]
    },
    {
      "id": "1c12aa7b-c51b-4d67-8dc4-f0b2754e00c9",
      "name": "Convert Signature to Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1888,
        912
      ]
    },
    {
      "id": "b060576e-fdbc-4197-8d94-d8fe50278bdf",
      "name": "Combine Invoice, Logo & Signature",
      "type": "n8n-nodes-base.merge",
      "position": [
        2128,
        720
      ]
    },
    {
      "id": "361637d4-3d81-4b26-92f1-9548634492b9",
      "name": "Prepare All Data for Template",
      "type": "n8n-nodes-base.code",
      "position": [
        2336,
        736
      ]
    },
    {
      "id": "b47b99e5-3dc2-4ccc-b6f6-fc2b2405f494",
      "name": "Build HTML Invoice from Data",
      "type": "n8n-nodes-base.html",
      "position": [
        2528,
        736
      ]
    },
    {
      "id": "6ae2ef17-ae23-42ae-a3d8-7d6ceefef0fe",
      "name": "Convert HTML to Binary File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2736,
        736
      ]
    },
    {
      "id": "bc2198cc-db3e-4e26-8c9d-8d0e21712bd3",
      "name": "Generate PDF via Gotenberg",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3008,
        736
      ]
    },
    {
      "id": "bd39e4c7-02cc-4f51-acbf-a0d38846401d",
      "name": "Email PDF Invoice to Customer",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3344,
        736
      ]
    },
    {
      "id": "429e995b-56e4-42cc-a067-23769c874859",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        576
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "fc976289-6e1c-4c5d-a2f6-b67bc77e06be",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        336
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "58d9621f-9474-4eee-a0dd-2f3bfcf2bb21",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        576
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "177fe258-4a12-4227-a0e3-6d458ae959e6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        960
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "adb9647a-28a7-4d5c-b596-4f2b278efb04",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2928,
        608
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9d011922-2cb6-4e45-afd5-19a1f10089a5",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3264,
        560
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "62f08730-d689-424a-9e69-388ea2503404",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        336
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Convert Logo to Base64": {
      "main": [
        [
          {
            "node": "Combine Invoice, Logo & Signature",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Fetch Company Logo Image": {
      "main": [
        [
          {
            "node": "Convert Logo to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate PDF via Gotenberg": {
      "main": [
        [
          {
            "node": "Email PDF Invoice to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert HTML to Binary File": {
      "main": [
        [
          {
            "node": "Generate PDF via Gotenberg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Signature to Base64": {
      "main": [
        [
          {
            "node": "Combine Invoice, Logo & Signature",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Build HTML Invoice from Data": {
      "main": [
        [
          {
            "node": "Convert HTML to Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Company Signature Image": {
      "main": [
        [
          {
            "node": "Convert Signature to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare All Data for Template": {
      "main": [
        [
          {
            "node": "Build HTML Invoice from Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invoice Data from QuickBooks": {
      "main": [
        [
          {
            "node": "Combine Invoice, Logo & Signature",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Invoice, Logo & Signature": {
      "main": [
        [
          {
            "node": "Prepare All Data for Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Listen for New QuickBooks Invoice": {
      "main": [
        [
          {
            "node": "Get Invoice Data from QuickBooks",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Company Logo Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Company Signature Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}