OnOffice

Consume OnOffice API

Actions12

Overview

This node interacts with the OnOffice API to manage "Relation" resources, specifically supporting the "Get Many" operation in this context. It retrieves multiple relation records that link estates and addresses (contacts) within the OnOffice system.

Common scenarios where this node is beneficial include:

  • Fetching a list of all relations between properties and contacts for reporting or synchronization.
  • Filtering relations based on specific criteria such as relation type or associated estate/address.
  • Paginating through large sets of relation data by specifying limits and offsets.

Practical example:

  • A real estate agency wants to retrieve all tenant relations linked to their properties to update their CRM system. They can use this node to query relations with a filter for tenants and limit results per request.

Properties

Name Meaning
Fields Comma-separated list of fields to return for each relation record. Default: id,type,estateid,addressid
Additional Fields Collection of optional parameters:
- Filter: JSON object defining filter criteria for the query.
- Limit: Maximum number of results to return (default 50).
- Offset: Number of results to skip before starting to collect the result set (default 0).

Output

The output is a JSON array where each item contains:

  • success: Boolean indicating if the API call was successful.
  • resourceType: The resource involved, here always "relation".
  • operation: The operation performed, here "getMany".
  • data: An array of relation records matching the query. Each record includes the requested fields such as id, type, estateid, and addressid.
  • total (optional): Total count of matching records available (if provided by the API).

No binary data output is produced by this operation.

Example output snippet:

[
  {
    "success": true,
    "resourceType": "relation",
    "operation": "getMany",
    "data": [
      {
        "id": "123",
        "type": "owner",
        "estateid": "456",
        "addressid": "789"
      },
      ...
    ],
    "total": 100
  }
]

Dependencies

  • Requires an active connection to the OnOffice API using valid API credentials (an API token and secret).
  • The node uses HMAC signature authentication for secure API requests.
  • No additional external dependencies beyond the OnOffice API and n8n's HTTP request capabilities.

Troubleshooting

  • Invalid JSON in Filter: If the filter field contains invalid JSON, the node throws an error "Filter must be a valid JSON". Ensure the filter input is correctly formatted JSON.
  • API Authentication Errors: If the API token or secret are incorrect or expired, the node will report an OnOffice API error with relevant messages. Verify and update credentials as needed.
  • Network Issues: Network errors during the HTTP request will cause the node to throw a "Network error" message. Check internet connectivity and API endpoint accessibility.
  • Unsupported Operation or Resource: Attempting operations other than "getMany" on the "relation" resource (or unsupported resources) will result in errors indicating unsupported operations.
  • Empty or Missing Fields Parameter: Providing an empty or malformed fields string may lead to incomplete or failed responses. Use a valid comma-separated list of fields.

Links and References

Discussion