{
  "name": "Automate invoice creation and delivery with Google Sheets, Invoice Ninja and Gmail + BillionVerify",
  "nodes": [
    {
      "id": "1009fb50-b8fe-4949-8756-c61311d0ab1f",
      "name": "0. Google Sheets (Invoice Trigger)",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -112,
        64
      ],
      "parameters": {},
      "description": "Triggers when a project's status is changed to 'Ready for Invoice'.",
      "typeVersion": 1
    },
    {
      "id": "bba87058-2b13-4f63-8999-f45b43256ff5",
      "name": "1. HTTP Request (Create Invoice)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        64
      ],
      "parameters": {},
      "description": "Sends data to the invoicing service API to create a new invoice.",
      "typeVersion": 1
    },
    {
      "id": "adbca28b-bd7a-488d-86bd-8280be4cebb7",
      "name": "2. Gmail (Send Invoice)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        64
      ],
      "parameters": {},
      "description": "Emails the newly created invoice to the client.",
      "typeVersion": 1
    },
    {
      "id": "029aee61-c444-4445-bd04-00ac3b86d708",
      "name": "3. Google Sheets (Update Status)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        640,
        64
      ],
      "parameters": {},
      "description": "Updates the project status to 'Invoiced' in Google Sheets.",
      "typeVersion": 3
    },
    {
      "id": "8d23368c-48fe-4752-a277-0d320b9045ae",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "33b56fca-b0c9-4c74-a17c-134aa775045c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        304
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "parameters": {
        "operation": "verify",
        "email": "={{ $json.email || $json.Email }}",
        "additionalOptions": {}
      },
      "type": "n8n-nodes-billionverify.billionVerify",
      "typeVersion": 1,
      "position": [
        40,
        64
      ],
      "name": "Verify Email (BillionVerify)",
      "credentials": {
        "billionVerifyApi": {
          "id": "",
          "name": "BillionVerify account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "is-deliverable",
              "leftValue": "={{ $json.is_deliverable }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ]
        }
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        220,
        64
      ],
      "name": "IF deliverable"
    }
  ],
  "connections": {
    "2. Gmail (Send Invoice)": {
      "main": [
        [
          {
            "node": "3. Google Sheets (Update Status)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. HTTP Request (Create Invoice)": {
      "main": [
        [
          {
            "node": "Verify Email (BillionVerify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0. Google Sheets (Invoice Trigger)": {
      "main": [
        [
          {
            "node": "1. HTTP Request (Create Invoice)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Email (BillionVerify)": {
      "main": [
        [
          {
            "node": "IF deliverable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF deliverable": {
      "main": [
        [
          {
            "node": "2. Gmail (Send Invoice)",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}