OnOffice IDs From Relation

Query for IDs related through relationships

Overview

This node queries related property IDs or detailed relation records from the OnOffice API based on specified relationship types and directions. It is useful for workflows that need to find estates linked to a given address or addresses linked to a given estate, filtered by the type of relationship (owner, tenant, interested party). For example, a real estate management workflow could use this node to retrieve all estates owned by a particular address or all addresses associated with a specific estate.

The node supports querying multiple relation types in one request and offers flexible output formats including full detailed records, only IDs, or combined sets of both. It can also optionally include debug information for troubleshooting.

Properties

Name Meaning
Relation Type Type of relation to query. Options: Owner, Tenant, Interested Party
Direction Direction of the relation query. Options: Find Estates for an Address, Find Addresses for an Estate
Address ID ID of the address to find related estates for (shown when direction is "Find Estates for an Address")
Estate ID ID of the estate to find related addresses for (shown when direction is "Find Addresses for an Estate")
Query Multiple Relation Types Whether to query multiple relation types in a single request (boolean)
Additional Relation Types Additional relation types to query alongside the main one. Options: Owner, Tenant, Interested Party
Output Format Format of the output data. Options: Full Records, IDs Only, Combined Sets
Include Debug Info Whether to include debug information in the output (boolean)

Output

The node outputs JSON data structured according to the selected output format:

  • Full Records: Detailed relation records grouped by relation type, including IDs and combined identifiers linking estates and addresses.
  • IDs Only: A simplified list containing only the related IDs aggregated across queried relation types.
  • Combined Sets: Both detailed records and combined sets of related properties, useful when querying multiple relation types simultaneously.
  • Debug Info (optional): When enabled, includes raw API response, request details, and URL used for the API call.

The output JSON contains keys indicating relation types with arrays of IDs and/or records, plus summary fields like total counts.

If the node encounters errors, it outputs a JSON object with success: false and an error message unless configured to continue on failure.

Dependencies

  • Requires an API token and secret credential for authenticating with the OnOffice API.
  • Makes HTTP POST requests to the OnOffice stable API endpoint (https://api.onoffice.de/api/stable/api.php).
  • Uses HMAC signature generation for request authentication.
  • Requires n8n credentials configuration for the OnOffice API access.

Troubleshooting

  • Common issues:
    • Invalid or missing API credentials will cause authentication failures.
    • Providing incorrect or non-existent Address or Estate IDs will result in empty or error responses.
    • Selecting incompatible combinations of relation types or directions may yield no results.
  • Error messages:
    • "OnOffice API error: <message>" indicates an issue reported by the API, such as invalid parameters or server errors.
    • Network or HTTP errors during the request will throw exceptions unless "Continue On Fail" is enabled.
  • Resolutions:
    • Verify API credentials are correctly set up in n8n.
    • Double-check input IDs and relation type selections.
    • Enable debug info to inspect raw API responses for deeper diagnosis.

Links and References

Discussion