{
  "id": "9pEgr7vVvXPDtNdZ",
  "name": "Automate Quickbook Customer & Estimation Creation",
  "tags": [],
  "nodes": [
    {
      "id": "4cf9b22e-5514-4e34-9cb3-ed66411e6de0",
      "name": "Set - normalize fields",
      "type": "n8n-nodes-base.set",
      "position": [
        540,
        980
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "Amount",
              "value": "={{$json.Amount }}"
            }
          ],
          "string": [
            {
              "name": "CustomerName",
              "value": "={{$json['CustomerName']}}"
            },
            {
              "name": "Email",
              "value": "={{$json['Email']}}"
            },
            {
              "name": "Phone",
              "value": "={{$json['Phone']}}"
            },
            {
              "name": "Company Name",
              "value": "={{$json['Company Name']}}"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "bd6f49f4-27ec-4a52-afe3-453863d0a785",
      "name": "QuickBooks - Find Customer",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1020,
        980
      ],
      "parameters": {
        "limit": 500,
        "filters": {
          "query": "=WHERE DisplayName = '{{ $json.CustomerName }}'\n\n"
        },
        "operation": "getAll"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "82e53cdc-6e3b-4df0-8f05-8b5802d97d69",
      "name": "IF - Customer exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        1460,
        980
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"Id\"] }}",
              "operation": "isEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8631ac1c-94a8-47a4-bc7d-601b55c4e388",
      "name": "QuickBooks - Create Customer (NEW)",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1960,
        640
      ],
      "parameters": {
        "operation": "create",
        "displayName": "={{ $('Google Sheets Trigger').item.json.CustomerName }}",
        "additionalFields": {
          "CompanyName": "={{ $('Google Sheets Trigger').item.json['Company Name'] }}",
          "PrimaryPhone": "={{ $('Google Sheets Trigger').item.json.Phone }}",
          "PrimaryEmailAddr": "={{ $('Google Sheets Trigger').item.json.Email }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "52f890dd-8f40-4e8d-abd6-ae844a01f97d",
      "name": "No-op (end)",
      "type": "n8n-nodes-base.noOp",
      "position": [
        3300,
        1000
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f98ee27a-73e2-4625-92f0-18fd2969760f",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        100,
        980
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/{YOUR_GOOGLE_SHEETS_ID}/edit#gid=0",
          "cachedResultName": "quickbooksCustomer"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "{YOUR_GOOGLE_SHEETS_ID}",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/{YOUR_GOOGLE_SHEETS_ID}/edit?usp=drivesdk",
          "cachedResultName": "quickbooksCustomer"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8addc4c1-0f40-4e07-83fe-f11ae9706069",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        640
      ],
      "parameters": {
        "color": 6,
        "width": 440,
        "height": 320,
        "content": "### Step 1: Google Sheet Trigger \ud83d\udcca\u26a1\n\nThis node listens for new rows appended to a Google Sheet and triggers the workflow each time a new entry is added.\n\nWhy this step is important:\n\n- \u23f0 Automatically starts the workflow without manual intervention.\n- \ud83d\udcc8 Captures new data entries in real time.\n- \ud83d\udd04 Ensures your automation reacts instantly to updates in the sheet.\n\nIt\u2019s the step that keeps your workflow in sync with your Google Sheet data. \ud83d\udd14\u2728\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9a2cd2c2-2d58-4a82-8187-937d96f7a6bc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        1140
      ],
      "parameters": {
        "width": 480,
        "height": 300,
        "content": "### Step 2: Data Formatter (Set Node) \ud83d\udee0\ufe0f\ud83d\udccb\n\nThis node formats and organizes the raw data from the Google Sheet into clean, usable variables for the workflow.\n\nWhy this step is important:\n\n- \ud83e\uddf9 Cleans and structures incoming data for easier processing.\n- \ud83d\udd04 Prepares variables needed for subsequent nodes.\n- \ud83c\udfaf Ensures consistent data format throughout the workflow.\n\nIt\u2019s the step that shapes your raw input into actionable information. \u2699\ufe0f\u2728\n"
      },
      "typeVersion": 1
    },
    {
      "id": "31fe85c1-e5e0-458c-9493-114ac37eb07f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        640
      ],
      "parameters": {
        "color": 3,
        "width": 560,
        "height": 300,
        "content": "### Step 3: Find Customer in QuickBooks \ud83d\udd0d\ud83d\udc64\n\nThis node uses the **Find Customer** operation to check if a customer already exists in QuickBooks based on the name.\n\nWhy this step is important:\n\n- \u2705 Avoids duplicate customer entries.\n- \ud83d\udd0e Confirms customer presence before creating or updating records.\n- \ud83d\udccb Helps maintain clean and accurate customer data.\n\nIt\u2019s the step that verifies your customer\u2019s existence to keep your database tidy and consistent. \ud83e\uddf9\u2728\n"
      },
      "typeVersion": 1
    },
    {
      "id": "532ad17a-c3a3-411d-94a6-23c68639644d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        1140
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 360,
        "content": "### Step 4: Customer Existence Check (If Node) \u2753\u2705\u274c\n\nThis node evaluates whether the customer exists based on the previous **Find Customer** step.\n\n- **True:** Customer does **not** exist in QuickBooks.\n- **False:** Customer **already exists** in QuickBooks.\n\nWhy this step is important:\n\n- \ud83d\udd04 Directs the workflow to create a new customer or skip creation.\n- \u2699\ufe0f Ensures the right path is taken for accurate data handling.\n- \ud83d\udee1\ufe0f Prevents duplicate customer records in your system.\n\nIt\u2019s the decision point that keeps your customer data clean and your workflow efficient. \ud83d\udd00\u2728\n"
      },
      "typeVersion": 1
    },
    {
      "id": "75bb775b-9f42-4502-b656-f155d4deee91",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1740,
        300
      ],
      "parameters": {
        "color": 4,
        "width": 540,
        "height": 300,
        "content": "### Step 5: Create New Customer in QuickBooks \u2795\ud83d\udc64\n\nThis node uses the **Create Customer** operation to add a new customer to QuickBooks when they don\u2019t already exist.\n\nWhy this step is important:\n\n- \ud83c\udd95 Adds missing customers automatically.\n- \ud83d\udce5 Keeps your QuickBooks customer database up-to-date.\n- \ud83d\udd17 Ensures new invoices link to the correct customer records.\n\nIt\u2019s the step that fills gaps in your customer list, making sure no one gets left out. \u270d\ufe0f\u2728\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fb2a8680-92e8-4a86-ba7c-c93a85a0c232",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3140,
        1180
      ],
      "parameters": {
        "color": 6,
        "width": 480,
        "height": 280,
        "content": "### Step 7: No-Op Node \ud83d\uded1\u2728\n\nThis node acts as a **no operation** step to gracefully conclude the workflow without performing any action.\n\nWhy this step is important:\n\n- \ud83d\udee1\ufe0f Ensures a smooth and clean workflow termination.\n- \ud83d\udd04 Prevents errors by providing a controlled end point.\n- \ud83e\udde9 Helps maintain clear and organized workflow logic.\n\nIt\u2019s the final checkpoint that safely wraps up the process. \ud83c\udfac\u2705\n"
      },
      "typeVersion": 1
    },
    {
      "id": "26f5e203-a313-4bcc-a7db-dcaaf10ce0fa",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        300
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 220,
        "content": "### Prerequisites \u2699\ufe0f\ud83d\udd17\n\n- Connect your **Google OAuth2** credentials with both **Google Sheets** and **Google Drive** enabled.\n- Connect your **QuickBooks OAuth2** credentials.\n\nThese connections ensure seamless authentication and access to the required services throughout the workflow. \ud83d\udd10\ud83d\ude80\n"
      },
      "typeVersion": 1
    },
    {
      "id": "242b1395-cbd2-414f-bccf-ab1a8921778b",
      "name": "Create an estimate",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        2860,
        640
      ],
      "parameters": {
        "Line": [
          {
            "Amount": "={{ $('Google Sheets Trigger').item.json.Amount}}",
            "itemId": "15",
            "LineNum": 1,
            "DetailType": "SalesItemLineDetail",
            "TaxCodeRef": "TAX",
            "Description": "Sales Estimate"
          }
        ],
        "resource": "estimate",
        "operation": "create",
        "CustomerRef": "={{ $json.Id }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "6fe76106-1236-41ec-96c0-f94eec48cce8",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2580,
        340
      ],
      "parameters": {
        "color": 5,
        "width": 580,
        "height": 280,
        "content": "### Step 6: Create Estimate in QuickBooks \ud83e\uddfe\u2728\n\nThis node uses the **Create Estimate** operation to generate an estimate in QuickBooks based on the data from the Google Sheet.\n\nWhy this step is important:\n\n- \ud83d\udcca Converts your sheet data into a formal QuickBooks estimate.\n- \ud83d\udcbc Streamlines your sales process by automating estimate creation.\n- \ud83d\udd17 Links estimates directly to customer and invoice records.\n\nIt\u2019s the step that turns raw data into actionable sales documents. \ud83d\udca1\ud83d\udcc8\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d02e5da2-204e-4461-bec0-815f13ab7b6e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3820,
        940
      ],
      "parameters": {
        "color": 6,
        "width": 520,
        "height": 340,
        "content": "### Get in Touch\n\nPlease feel free to reachout to us, if you need any help in settin up this workflow.\n\nWe can also help customize workflow pet the use-case. \n\nReach out us at: getstarted@intuz.com\n\nWebsite: https://www.intuz.com/\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "21e19475-1189-471a-bbfc-57b092fa82a6",
  "connections": {
    "Create an estimate": {
      "main": [
        [
          {
            "node": "No-op (end)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Set - normalize fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Customer exists?": {
      "main": [
        [
          {
            "node": "QuickBooks - Create Customer (NEW)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No-op (end)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set - normalize fields": {
      "main": [
        [
          {
            "node": "QuickBooks - Find Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QuickBooks - Find Customer": {
      "main": [
        [
          {
            "node": "IF - Customer exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QuickBooks - Create Customer (NEW)": {
      "main": [
        [
          {
            "node": "Create an estimate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}