OnOffice icon

OnOffice

Consume OnOffice API

Actions15

Overview

This node integrates with the OnOffice API to manage real estate-related data. Specifically, for the Address - Create operation, it allows users to create a new address record in the OnOffice system by providing structured address data.

Common scenarios where this node is beneficial include:

  • Automating the addition of new contact addresses into the OnOffice CRM when leads or clients are captured from other systems.
  • Synchronizing address data from external sources into OnOffice without manual entry.
  • Bulk creation of address records as part of larger workflows involving real estate management.

For example, you might use this node to automatically add a new client’s contact details (name, email, phone, street, city, country) into OnOffice whenever a form is submitted on your website.

Properties

Name Meaning
Data JSON object containing the address details to create. The JSON should include fields such as:
- Form of Address (e.g., "Herr")
- First Name
- Last Name
- Email
- Phone 1
- Street
- Postal Code
- City
- Country

Example default JSON value:

{
  "Anrede": "Herr",
  "Vorname": "Max",
  "Name": "Mustermann",
  "Email": "[email protected]",
  "Telefon1": "+49 123 456789",
  "Strasse": "Musterstraße",
  "Plz": "12345",
  "Ort": "Musterstadt",
  "Land": "Deutschland"
}

Output

The node outputs a JSON object representing the result of the create operation. The structure includes:

  • success: Boolean indicating if the creation was successful.
  • resourceType: The resource type, here always "address".
  • operation: The operation performed, here "create".
  • data: The created address data returned from the API, which may include the newly assigned ID and all submitted fields.
  • message: A status message from the API confirming the creation.
  • rawResponse: The full raw response from the OnOffice API for debugging purposes.

If an error occurs, the output will contain error details including the error message and any API error response.

Dependencies

  • Requires an API authentication token and secret credential for the OnOffice API.
  • The node makes HTTP POST requests to the OnOffice API endpoint at https://api.onoffice.de/api/latest/api.php.
  • HMAC signature generation is used for request authentication.
  • Proper configuration of the OnOffice API credentials in n8n is necessary.

Troubleshooting

  • Invalid JSON in Data property: If the JSON provided in the "Data" field is malformed, the node throws an error stating "Data must be a valid JSON". Ensure the JSON syntax is correct.
  • API Request Failed: Network issues, invalid credentials, or API downtime can cause request failures. Check the API token and secret, network connectivity, and OnOffice service status.
  • API action errors: If the API returns an error code, the node surfaces the error message from the API. Review the message for details, such as missing required fields or invalid data formats.
  • Unsupported Resource or Operation: If the node is configured with unsupported resource or operation values, it throws an error indicating the unsupported combination.

To resolve these issues:

  • Validate JSON input carefully.
  • Verify API credentials and permissions.
  • Consult OnOffice API documentation for required fields and data formats.
  • Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.

Links and References

Discussion