Actions12
Overview
This node interacts with the OnOffice API to manage "Relation" resources, specifically supporting the "Get Many" operation. It retrieves multiple relation records that link estates and addresses (contacts) in the OnOffice system. This is useful when you want to fetch a list of relations with specific fields and apply filters, limits, or offsets to control the data returned.
Practical examples include:
- Retrieving all relations of a certain type between estates and contacts.
- Fetching a paginated list of relations for reporting or synchronization purposes.
- Applying filters to get only relations matching certain criteria, such as those linked to a specific estate or address.
Properties
| Name | Meaning |
|---|---|
| Fields | Comma-separated list of fields to return for each relation record (e.g., 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 node outputs an array of JSON objects representing the retrieved relation records. Each output item contains:
success: Boolean indicating if the operation was successful.resourceType: The resource involved, here always"relation".operation: The operation performed, here"getMany".data: An array of relation records, each containing the requested fields.total(optional): Total count of matching records available on the server (if provided by the API).
No binary data is output by this node.
Example output structure (simplified):
{
"success": true,
"resourceType": "relation",
"operation": "getMany",
"data": [
{
"id": "123",
"type": "owner",
"estateid": "456",
"addressid": "789"
},
...
],
"total": 100
}
Dependencies
- Requires an API token and secret credential for authenticating with the OnOffice API.
- The node makes HTTP POST requests to the OnOffice API endpoint at
https://api.onoffice.de/api/latest/api.php. - Proper configuration of the API credentials within n8n is necessary.
Troubleshooting
- Invalid JSON in Filter: If the filter field contains invalid JSON, the node throws an error stating "Filter must be a valid JSON". Ensure the filter input is correctly formatted JSON.
- API Authentication Errors: If the API token or secret is missing or incorrect, the node will fail with an authentication error from the OnOffice API.
- Network Issues: Network errors during the HTTP request will cause the node to throw a network error message.
- Unsupported Operation or Resource: If an unsupported operation or resource is selected, the node throws an error indicating the unsupported action.
- Empty or Incorrect Fields: Providing an empty or malformed fields string may result in incomplete or no data returned.
To resolve these issues:
- Validate JSON inputs carefully.
- Verify API credentials are correct and have sufficient permissions.
- Check network connectivity.
- Use supported operations and resources as documented.
Links and References
- OnOffice API Documentation (official API docs)
- n8n documentation on HTTP Request node for understanding underlying HTTP calls
- JSON validation tools for checking filter syntax (e.g., https://jsonlint.com/)