Generación automática de recibos de venta de QuickBooks desde pagos y creación de clientes de Stripe

Avanzado

Este es unMiscellaneous, Multimodal AIflujo de automatización del dominio deautomatización que contiene 17 nodos.Utiliza principalmente nodos como If, Code, Merge, Stripe, Webhook. Automatizar la creación de clientes y recibos de venta en QuickBooks desde pagos de Stripe

Requisitos previos
  • Clave de API de Stripe
  • Punto final de HTTP Webhook (n8n generará automáticamente)
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "mbJzXoWPLzePg3yv",
  "meta": {
    "instanceId": "1a54c41d9050a8f1fa6f74ca858828ad9fb97b9fafa3e9760e576171c531a787"
  },
  "name": "Automate QuickBooks Sales Receipts from Stripe Payments & Customer Creation",
  "tags": [],
  "nodes": [
    {
      "id": "fb397649-1ad0-4463-9fb8-49e108d8bc79",
      "name": "QuickBooks - Buscar Cliente",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        2720,
        1040
      ],
      "parameters": {
        "limit": 500,
        "filters": {
          "query": "=WHERE DisplayName = '{{ $json.name }}'\n\n"
        },
        "operation": "getAll"
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "73f28e8b-93b2-4558-9ec7-230da270ec68",
      "name": "IF - ¿Existe el Cliente?",
      "type": "n8n-nodes-base.if",
      "position": [
        3712,
        1472
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.Id ?? \"\" }}",
              "operation": "isEmpty"
            }
          ]
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "25aec5a5-126e-4742-ab8a-011c18b26db7",
      "name": "Crear un cliente",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        4800,
        992
      ],
      "parameters": {
        "operation": "create",
        "displayName": "={{ $('Get a customer').item.json.name }}",
        "additionalFields": {
          "PrimaryEmailAddr": "={{ $('Get a customer').item.json.email }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6bca213b-7091-4665-bc11-5c903acb155f",
      "name": "Crear un pago",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        6880,
        992
      ],
      "parameters": {
        "TotalAmt": "={{ $('Convert payment Amount').item.json.convertedAmount }}",
        "resource": "payment",
        "operation": "create",
        "CustomerRef": "={{ $json.Id }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "7bf091c8-9387-4934-bec7-7d2ef106c5ea",
      "name": "Obtener un cliente",
      "type": "n8n-nodes-base.stripe",
      "position": [
        1744,
        1520
      ],
      "parameters": {
        "resource": "customer",
        "customerId": "={{ $json.body.data.object.customer }}"
      },
      "typeVersion": 1
    },
    {
      "id": "5e2a9bfc-45f4-407a-b40e-6244123003eb",
      "name": "Combinar",
      "type": "n8n-nodes-base.merge",
      "position": [
        5856,
        1472
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "4cc8fdbd-19b2-40d3-8925-1516b66ef8d0",
      "name": "Capturar Pago",
      "type": "n8n-nodes-base.webhook",
      "position": [
        64,
        1488
      ],
      "webhookId": "3a5c2d05-9c40-43f0-898e-90a5fde7280b",
      "parameters": {
        "path": "3a5c2d05-9c40-43f0-898e-90a5fde7280b",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "77fcc804-50f2-4e82-8a9d-100be12a0fef",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        1120
      ],
      "parameters": {
        "color": 3,
        "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 payment is successfully processed on Stripe, the webhook immediately captures the event payload and triggers the workflow execution.  \n- The captured data includes essential payment details such as:\n  - Customer ID  \n  - Payment ID  \n  - Amount paid  \n  - Payment status  \n- This ensures the workflow only runs when a payment has been **successfully completed**.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "194c40c9-e398-4b78-a537-1c999570304d",
      "name": "Convertir Monto del Pago",
      "type": "n8n-nodes-base.code",
      "position": [
        928,
        1072
      ],
      "parameters": {
        "jsCode": "// n8n Code Node (JavaScript)\n\nreturn items.map(item => {\n  const amount = $input.first().json.body.data.object.amount;\n  \n  // Convert from cents to dollars\n  const convertedAmount = amount / 100;\n\n  // Add the new value to the output JSON\n  item.json.convertedAmount = convertedAmount;\n\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "29c99c71-3c5d-4255-bd7a-522874ef43e5",
      "name": "Nota Adhesiva1",
      "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 in cents by Stripe) into a **readable currency format**.  \n- Example transformation:  \n  - Stripe raw value: `7101`  \n  - Parsed output: `$71.01`  \n- This ensures that the amount is standardized and properly formatted before passing it on to **QuickBooks** for further operations.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "45b854bb-cd87-4cf6-a67d-bc6a21a2e080",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        1280
      ],
      "parameters": {
        "color": 4,
        "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 as **customer name, email, and billing details** are available for downstream processing.  \n- The fetched data is later used to check if the customer already exists in **QuickBooks** or needs to be created.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "ae0e4c66-fac8-4514-b816-8de9ed4e4961",
      "name": "Nota Adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2576,
        768
      ],
      "parameters": {
        "color": 5,
        "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 address** or other unique identifiers.  \n- If the customer **exists**, the workflow proceeds with the existing record.  \n- If the customer **does not exist**, the workflow routes to create a new customer in QuickBooks.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "cfdca3ee-8198-46e5-9729-9c9bcd7f3112",
      "name": "Nota Adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3552,
        1232
      ],
      "parameters": {
        "color": 3,
        "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**, the workflow proceeds to the **Create Customer** node to register a new customer in QuickBooks.  \n- **False Branch:** If the customer **already exists**, the workflow skips creation and continues with the existing customer record.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "e4d83682-634b-43f7-8a10-108f922edb0c",
      "name": "Nota Adhesiva5",
      "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 in QuickBooks are properly registered.  \n- Key customer information such as **Name, Email, and Billing Details** is mapped from Stripe to QuickBooks fields for consistency.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "89751237-b9f3-4ace-adcb-4720aa04d5c6",
      "name": "Nota Adhesiva6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5680,
        1232
      ],
      "parameters": {
        "color": 6,
        "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 already existing customer) flow into a **single unified output**.  \n- Consolidated data is then passed forward for creating the corresponding **Sales Receipt** in QuickBooks.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "674159c2-9903-4fb3-a36e-a25d4ea847d0",
      "name": "Nota Adhesiva7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6720,
        768
      ],
      "parameters": {
        "color": 4,
        "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** parsed from Stripe.  \n- Automatically generates a **sales receipt** in QuickBooks for the successful payment.  \n- Ensures accurate and real-time recording of customer transactions in QuickBooks.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "2bc405e8-a7de-4e4b-afe4-58a064311f91",
      "name": "Nota Adhesiva8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        592
      ],
      "parameters": {
        "color": 4,
        "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 enabled.  \n  - This allows the workflow to automatically trigger when a payment is successfully completed.  \n\n- **QuickBooks Setup:**\n  - Connect your QuickBooks account in n8n using OAuth2 credentials.  \n  - Ensure access to customer and sales receipt operations is enabled.  \n\n- **n8n Configuration:**\n  - Connect your Stripe credentials to the Webhook and Get Customer nodes.  \n  - Connect your QuickBooks credentials to the Find Customer, Create Customer, and Create Sales Receipt nodes.  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9d1ff60d-2326-486a-968c-b0fee80f6efc",
  "connections": {
    "5e2a9bfc-45f4-407a-b40e-6244123003eb": {
      "main": [
        [
          {
            "node": "6bca213b-7091-4665-bc11-5c903acb155f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7bf091c8-9387-4934-bec7-7d2ef106c5ea": {
      "main": [
        [
          {
            "node": "fb397649-1ad0-4463-9fb8-49e108d8bc79",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4cc8fdbd-19b2-40d3-8925-1516b66ef8d0": {
      "main": [
        [
          {
            "node": "194c40c9-e398-4b78-a537-1c999570304d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "25aec5a5-126e-4742-ab8a-011c18b26db7": {
      "main": [
        [
          {
            "node": "5e2a9bfc-45f4-407a-b40e-6244123003eb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73f28e8b-93b2-4558-9ec7-230da270ec68": {
      "main": [
        [
          {
            "node": "25aec5a5-126e-4742-ab8a-011c18b26db7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "5e2a9bfc-45f4-407a-b40e-6244123003eb",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "194c40c9-e398-4b78-a537-1c999570304d": {
      "main": [
        [
          {
            "node": "7bf091c8-9387-4934-bec7-7d2ef106c5ea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fb397649-1ad0-4463-9fb8-49e108d8bc79": {
      "main": [
        [
          {
            "node": "73f28e8b-93b2-4558-9ec7-230da270ec68",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Avanzado - Varios, IA Multimodal

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos17
Categoría2
Tipos de nodos7
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Autor
Intuz

Intuz

@intuz

Workflow automation can help automate your routine activities and help saves $$$, as well as hours of time. As a boutique tech consulting company, Intuz help businesses with custom AI/ML, AI Workflow Automations, and software development. Automate your business workflow for: Sales Marketing Accounting Finance Operations E-Commerce Customer Support Admin & Backoffice Logistics & Supply Chain

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34