HostBill icon

HostBill

Consume HostBill API (v.0.1.3)

Overview

This n8n custom node allows you to create invoices in HostBill by interacting with the HostBill API. The node is designed for automation scenarios where you need to programmatically generate invoices for clients, such as when onboarding new customers, processing orders, or integrating billing workflows between systems.

Example use cases:

  • Automatically creating an invoice when a new client signs up.
  • Generating invoices as part of a larger order fulfillment workflow.
  • Integrating HostBill invoicing into your CRM or ERP system.

Properties

Name Type Meaning
Client ID Number Client id to create invoice for (required).

Output

The node outputs a JSON object (or array of objects) representing the result of the invoice creation operation. The exact structure depends on the HostBill API's response for the "Create Invoice" operation. If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message.

Example output:

[
  {
    "invoice_id": 12345,
    "status": "created",
    "client_id": 67890,
    // ...other fields returned by HostBill API
  }
]

If binary data is ever returned, it would represent file attachments or documents related to the invoice, but this node primarily returns structured JSON.

Dependencies

  • HostBill API: Requires access to a HostBill instance with API enabled.
  • API Credentials: You must configure the hostBillApi credentials in n8n.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common issues:

  • Invalid Credentials: If the API key or connection details are incorrect, authentication errors will occur.
  • Missing Required Fields: If "Client ID" is not provided or invalid, the API may reject the request.
  • API Errors: Any errors from the HostBill API (such as permission issues or server errors) will be surfaced as node errors.

Error messages:

  • "Cannot read property 'execute' of undefined": This may indicate a misconfiguration or missing dependency.
  • "Invalid client id": Ensure the "Client ID" exists in your HostBill system.
  • "Authentication failed": Check your API credentials in n8n.

Links and References

Discussion