Actions39
- Client Actions
- Client Contact Actions
- Invoice Actions
- Order Actions
- Account Actions
- Service Actions
- Domain Actions
Overview
This node allows you to create a new Client Contact in HostBill via its API. It is designed for scenarios where you need to automate the onboarding of client contacts, such as when integrating customer sign-up forms, synchronizing CRM data, or managing client access and privileges programmatically.
Practical examples:
- Automatically add a new contact for a client after a web form submission.
- Batch import client contacts from another system into HostBill.
- Set up workflows that assign specific privileges to new client contacts based on business rules.
Properties
Name | Type | Meaning |
---|---|---|
Client ID | Number | The unique identifier of the client to whom the contact will be added. |
First name | String | The first name of the new contact. |
Last name | String | The last name of the new contact. |
String | The email address for the new contact. | |
Password | String | The password for the new contact's account. |
Confirm Password | String | Confirmation of the password (must match the Password field). |
Additional Fields | Collection | Optional additional information about the contact, such as phone number and address details. |
Phone Number | String | The contact's phone number. |
Address Line 1 | String | The first line of the contact's address. |
Address Line 2 | String | The second line of the contact's address. |
City | String | The city of the contact's address. |
State | String | The state or region of the contact's address. |
Post Code | String | The postal code of the contact's address. |
Country | String | The country of the contact's address. |
Privileges | Collection | A set of boolean options specifying what permissions the contact should have. |
Billing: Receive billing notifications | Boolean | Whether the contact receives billing emails. |
Billing: Allow to view/pay invoices | Boolean | Whether the contact can view and pay invoices. |
Billing: Place new orders | Boolean | Whether the contact can place new orders. |
Billing: View current balance | Boolean | Whether the contact can view the current balance. |
Billing: Add funds | Boolean | Whether the contact can add funds. |
Billing: Creditcard | Boolean | Whether the contact can manage credit cards. |
Support: Open new tickets | Boolean | Whether the contact can open support tickets. |
Support: View current tickets | Boolean | Whether the contact can view existing tickets. |
Support: Close tickets | Boolean | Whether the contact can close tickets. |
Support: Receive email notifications | Boolean | Whether the contact receives support-related emails. |
Misc: Modify main profile details | Boolean | Whether the contact can modify main profile details. |
Misc: View emails history | Boolean | Whether the contact can view email history. |
Misc: Edit security settings | Boolean | Whether the contact can edit security settings. |
Misc: Add / Edit contacts | Boolean | Whether the contact can manage other profiles. |
Misc: Access affiliates section | Boolean | Whether the contact can access the affiliates section. |
Output
The node returns a JSON object representing the newly created client contact. The structure typically includes:
- The details of the created contact (such as ID, name, email, etc.).
- Any additional fields provided during creation.
- The assigned privileges.
- If an error occurs and "Continue On Fail" is enabled, the output will include an
error
field with the error message.
Example output:
{
"id": 12345,
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"phonenumber": "+1234567890",
"privileges": {
"billing_emails": true,
"support_newticket": false
}
}
If binary data is ever returned, it would represent file attachments or similar, but this operation is expected to return only JSON.
Dependencies
- HostBill API: Requires valid HostBill API credentials configured in n8n under the credential type
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. Ensure your HostBill API key and URL are correctly set in n8n credentials.
- Missing Required Fields: If any required property (e.g., Client ID, First name, Last name, Email, Password, Confirm Password) is missing, the node will fail with a validation error.
- Password Mismatch: If "Password" and "Confirm Password" do not match, the API may reject the request.
- API Errors: If the HostBill API returns an error (e.g., duplicate email, invalid client ID), the node will either throw an error or, if "Continue On Fail" is enabled, output an error message in the result.
Error messages:
"Authentication failed"
: Check your API credentials."Required field missing"
: Ensure all mandatory properties are filled."Password confirmation does not match"
: Make sure both password fields are identical."Client not found"
: Verify the Client ID exists in HostBill.