Actions39
- Client Actions
- Client Contact Actions
- Invoice Actions
- Order Actions
- Account Actions
- Service Actions
- Domain Actions
Overview
The HostBill node for n8n allows you to interact with the HostBill API. Specifically, when using the Invoice resource and the Add Item operation, this node enables you to add a new item (line) to an existing invoice in your HostBill system. This is useful for automating billing workflows, such as programmatically updating invoices with additional products, services, or fees.
Practical examples:
- Automatically adding late payment fees to invoices.
- Adding custom service charges based on workflow logic.
- Updating invoices with new items after customer requests.
Properties
Name | Type | Meaning |
---|---|---|
Invoice ID | Number | The unique identifier of the invoice to which the item will be added. |
Description | String | Description of the new invoice item (line). |
Price | String | The price of the new invoice item. |
Item QTY | Number | Quantity of the item being added to the invoice. |
Item is Taxed | Boolean | Indicates whether the item should be taxed (true or false ). |
Output
The node returns a JSON object (or array of objects if processing multiple items) representing the result of the "Add Item" operation. The exact structure depends on the HostBill API response, but typically includes details about the updated invoice or the newly added item.
If an error occurs and "Continue On Fail" is enabled, the output will include an error
field with the error message.
Example output:
[
{
"id": 123,
"line": "Consulting Service",
"price": "100.00",
"qty": 2,
"tax": true,
// ...other fields returned by HostBill API
}
]
Or, in case of error:
[
{
"error": "Invalid invoice ID"
}
]
Dependencies
- External Service: Requires access to a HostBill instance with API enabled.
- API Credentials: You must configure valid HostBill API credentials in n8n under the name
hostBillApi
. - n8n Configuration: No special environment variables are required beyond standard credential setup.
Troubleshooting
Common issues:
- Invalid credentials: If the API credentials are incorrect or missing, the node will throw an authentication error.
- Invalid Invoice ID: Providing a non-existent or invalid invoice ID will result in an error from the HostBill API.
- Missing required fields: Omitting any required property (e.g., Description, Price, QTY) will cause the operation to fail.
- API connectivity issues: Network problems or incorrect HostBill API endpoint configuration can lead to connection errors.
Error messages:
"Invalid invoice ID"
: Check that the Invoice ID exists in your HostBill system."Authentication failed"
: Verify your HostBill API credentials in n8n."Missing required parameter"
: Ensure all required fields are filled in the node configuration.