Actions5
Overview
The Lexoffice Public API node for n8n enables users to interact with the Lexoffice platform, specifically to create new contacts via the "API Contact POST" operation. This is useful for automating the process of adding customer or vendor contact information from other systems (such as CRMs, e-commerce platforms, or web forms) directly into Lexoffice, streamlining business workflows and reducing manual data entry.
Practical examples:
- Automatically add new customers from an online shop to Lexoffice.
- Sync contact data from a CRM system to Lexoffice.
- Batch import contacts from a CSV file into Lexoffice.
Properties
| Name | Type | Meaning |
|---|---|---|
| Category | options | Specifies the type of resource to interact with in Lexoffice. For this operation, it should be set to Contacts. Other categories are available but not relevant for this operation. |
| JSON | json | The full contact data to be sent to Lexoffice in JSON format. This includes roles (customer/vendor), company details, addresses (billing/shipping), email addresses, phone numbers, and notes. The structure must match Lexoffice's API requirements. See below for example and field meanings. |
JSON Property Structure Example
{
"roles": {
"customer": {},
"vendor": {}
},
"company": {
"name": "Testfirma",
"taxNumber": "12345/12345",
"vatRegistrationId": "DE123456789",
"allowTaxFreeInvoices": true,
"contactPersons": [
{
"salutation": "Herr",
"firstName": "Max",
"lastName": "Mustermann",
"emailAddress": "contactpersonmail@lexoffice.de",
"phoneNumber": "08000/11111"
}
]
},
"addresses": {
"billing": [
{
"supplement": "Rechnungsadressenzusatz",
"street": "Hauptstr. 5",
"zip": "12345",
"city": "Musterort",
"countryCode": "DE"
}
],
"shipping": [
{
"supplement": "Lieferadressenzusatz",
"street": "Schulstr. 13",
"zip": "76543",
"city": "MUsterstadt",
"countryCode": "DE"
}
]
},
"emailAddresses": {
"business": ["business@lexoffice.de"],
"office": ["office@lexoffice.de"],
"private": ["private@lexoffice.de"],
"other": ["other@lexoffice.de"]
},
"phoneNumbers": {
"business": ["08000/1231"],
"office": ["08000/1232"],
"mobile": ["08000/1233"],
"private": ["08000/1234"],
"fax": ["08000/1235"],
"other": ["08000/1236"]
},
"note": "Notizen"
}
Output
- The node outputs a single item per input, with the following structure:
json: Contains the response from Lexoffice after creating the contact. The exact fields depend on Lexoffice's API response, but typically include identifiers and status information about the created contact.
- No binary output is produced by this operation.
Dependencies
- External Service: Requires access to the Lexoffice Public API.
- Credentials: You must configure the
lexofficePuplicApicredentials in n8n, which should include:domain: The base URL for the Lexoffice API.token: A valid API token for authentication.
Troubleshooting
Common Issues:
- Invalid Credentials: If the API token or domain is incorrect, the node will throw an authentication error. Ensure your credentials are correct and have sufficient permissions.
- Malformed JSON: If the JSON property is not valid JSON, the node will return an error such as
Error parsing JSON. Double-check your JSON syntax. - Missing Required Fields: If required fields are missing in the JSON body, Lexoffice may reject the request. Refer to the Lexoffice API documentation for required fields.
- No API Item found: If the category or operation is misconfigured, you may see an error like
No API Item found. Make sure "Category" is set to "Contacts" and "Operation" to "API Contact POST".
Links and References
- Lexoffice API Documentation
- n8n Documentation: Creating Custom Nodes
- JSON Validator Tool (for checking your JSON syntax)