{
  "name": "Automate QuickBooks sales receipts & customer creation from Stripe payments",
  "nodes": [
    {
      "id": "fb397649-1ad0-4463-9fb8-49e108d8bc79",
      "name": "QuickBooks - Find Customer",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        2720,
        1040
      ]
    },
    {
      "id": "73f28e8b-93b2-4558-9ec7-230da270ec68",
      "name": "IF - Customer Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        3712,
        1472
      ]
    },
    {
      "id": "25aec5a5-126e-4742-ab8a-011c18b26db7",
      "name": "Create a customer",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        4800,
        992
      ]
    },
    {
      "id": "6bca213b-7091-4665-bc11-5c903acb155f",
      "name": "Create a payment",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        6880,
        992
      ]
    },
    {
      "id": "7bf091c8-9387-4934-bec7-7d2ef106c5ea",
      "name": "Get a customer",
      "type": "n8n-nodes-base.stripe",
      "position": [
        1744,
        1520
      ]
    },
    {
      "id": "5e2a9bfc-45f4-407a-b40e-6244123003eb",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        5856,
        1472
      ]
    },
    {
      "id": "4cc8fdbd-19b2-40d3-8925-1516b66ef8d0",
      "name": "Capture Payment",
      "type": "n8n-nodes-base.webhook",
      "position": [
        64,
        1488
      ]
    },
    {
      "id": "77fcc804-50f2-4e82-8a9d-100be12a0fef",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        1120
      ],
      "parameters": {
        "width": 480,
        "height": 512,
        "content": "### **Step 1 – Webhook (Capture Payment)**\n\n- This node acts as the **entry point** of the workflow.  \n- It listens for the **successful payment intent event** coming from **Stripe**.  \n- When a payme"
      }
    },
    {
      "id": "194c40c9-e398-4b78-a537-1c999570304d",
      "name": "Convert payment Amount",
      "type": "n8n-nodes-base.code",
      "position": [
        928,
        1072
      ]
    },
    {
      "id": "29c99c71-3c5d-4255-bd7a-522874ef43e5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        752
      ],
      "parameters": {
        "width": 480,
        "height": 512,
        "content": "### **Step 2 – Code (Parse Payment Amount)**\n\n- This node processes the raw payment data received from **Stripe** via the webhook.  \n- Specifically, it **parses the payment amount** (usually provided "
      }
    },
    {
      "id": "45b854bb-cd87-4cf6-a67d-bc6a21a2e080",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        1280
      ],
      "parameters": {
        "width": 496,
        "height": 432,
        "content": "### **Step 3 – Get Customer (Stripe)**\n\n- This node retrieves **customer details directly from Stripe** using the customer ID obtained from the payment event.  \n- Ensures all relevant information such"
      }
    },
    {
      "id": "ae0e4c66-fac8-4514-b816-8de9ed4e4961",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2576,
        768
      ],
      "parameters": {
        "width": 400,
        "height": 448,
        "content": "### **Step 4 – Find Customer (QuickBooks)**\n\n- This node checks in **QuickBooks** whether the customer retrieved from Stripe already exists.  \n- The lookup is generally performed using the **email add"
      }
    },
    {
      "id": "cfdca3ee-8198-46e5-9729-9c9bcd7f3112",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3552,
        1232
      ],
      "parameters": {
        "width": 432,
        "height": 384,
        "content": "### **Step 5 – IF Node: Customer Exists?**\n\n- This conditional node evaluates whether the customer retrieved from QuickBooks already exists.  \n- **True Branch:** If the customer **does not exist**, th"
      }
    },
    {
      "id": "e4d83682-634b-43f7-8a10-108f922edb0c",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4624,
        784
      ],
      "parameters": {
        "width": 448,
        "height": 368,
        "content": "### **Step 6 – Create Customer in QuickBooks**\n\n- This node creates a **new customer record** in QuickBooks using details fetched from Stripe.  \n- It ensures that customers who are not already present"
      }
    },
    {
      "id": "89751237-b9f3-4ace-adcb-4720aa04d5c6",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5680,
        1232
      ],
      "parameters": {
        "width": 448,
        "height": 416,
        "content": "### **Step 7 – Merge Customer Data**\n\n- This is a **Merge node** that combines data streams from the **Create Customer** node and the **If** node.  \n- Ensures both scenarios (newly created customer or"
      }
    },
    {
      "id": "674159c2-9903-4fb3-a36e-a25d4ea847d0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6720,
        768
      ],
      "parameters": {
        "width": 416,
        "height": 384,
        "content": "### **Step 8 – Create Sales Receipt in QuickBooks**\n\n- This is a **Create Sales Receipt** node in QuickBooks.  \n- Uses the **customer details** (merged in Step 7) and the **payment information** parse"
      }
    },
    {
      "id": "2bc405e8-a7de-4e4b-afe4-58a064311f91",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        592
      ],
      "parameters": {
        "width": 560,
        "height": 432,
        "content": "### **Prerequisites**\n\nBefore running this workflow, ensure the following setup is complete:\n\n- **Stripe Setup:**\n  - Add a webhook in your Stripe account with the `payment_intent.succeeded` event ena"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Create a payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a customer": {
      "main": [
        [
          {
            "node": "QuickBooks - Find Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Capture Payment": {
      "main": [
        [
          {
            "node": "Convert payment Amount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a customer": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Customer Exists?": {
      "main": [
        [
          {
            "node": "Create a customer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Convert payment Amount": {
      "main": [
        [
          {
            "node": "Get a customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QuickBooks - Find Customer": {
      "main": [
        [
          {
            "node": "IF - Customer Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}