OnOffice icon

OnOffice

Consume OnOffice API

Actions15

Overview

This node integrates with the OnOffice API to manage real estate-related data. Specifically, for the Relation - Get operation, it retrieves detailed information about a specific relation entity by its ID. Relations typically represent connections between estates and addresses (contacts), such as ownership or tenancy.

Common scenarios where this node is beneficial include:

  • Fetching details of a particular relationship between a property and a contact.
  • Integrating OnOffice relation data into workflows for CRM, property management, or reporting.
  • Automating retrieval of relation metadata to trigger further actions in n8n workflows.

Example use case: You want to get the details of a relation that links a tenant (address/contact) to an estate (property) to verify their association before sending notifications or updating records.

Properties

Name Meaning
Relation ID The unique identifier of the relation to retrieve. This is required to specify which relation to fetch.
Fields The fields to return for the relation. Options include: ID, Type, Estate ID, Address ID. By default, all these fields are returned.

Output

The node outputs JSON data containing the requested relation information. The structure includes:

  • success: Boolean indicating if the API call was successful.
  • resourceType: The resource type, here always "relation".
  • operation: The operation performed, here "get".
  • data: An array of relation records matching the request. For the "get" operation, this usually contains one record with the requested fields.
  • total (optional): Total number of records if applicable.
  • message (optional): Informational message from the API response.
  • rawResponse: The full raw API response for debugging purposes.

No binary data output is produced by this operation.

Example output snippet:

{
  "success": true,
  "resourceType": "relation",
  "operation": "get",
  "data": [
    {
      "id": "12345",
      "type": "owner",
      "estateid": "67890",
      "addressid": "54321"
    }
  ],
  "message": "Relation retrieved successfully"
}

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 creating or updating relations (not applicable for "get"), ensure the JSON input is valid; otherwise, a parsing error will occur.
  • API Request Failed: Network issues, invalid credentials, or incorrect parameters can cause failures. Check the error message and raw response for details.
  • Unsupported Resource or Operation: Using unsupported combinations will throw errors indicating the resource or operation is not supported.
  • Missing Required Parameters: The "Relation ID" must be provided for the "get" operation; missing it will cause an error.
  • API Action Errors: The API may return error codes with messages; these are surfaced as node errors with the API's message included.

To resolve errors:

  • Verify credentials and API access.
  • Confirm all required parameters are set.
  • Review the raw API response for specific error details.
  • Use the "Continue on Fail" option in n8n to handle errors gracefully in workflows.

Links and References

Discussion