Actions12
Overview
This node interacts with the OnOffice API to manage "Relation" resources, which represent relationships between estates and addresses (contacts). Specifically, the "Get" operation retrieves detailed information about a single relation by its unique ID. This is useful in scenarios where you need to fetch specific relationship data, such as identifying the type of connection (owner, tenant, contact, etc.) between an estate and a contact.
Practical examples:
- Retrieve the details of a particular relation to display or process in a workflow.
- Use the relation data to link estate and contact information for reporting or notifications.
Properties
| Name | Meaning |
|---|---|
| Relation ID | The unique identifier of the relation to retrieve or delete. |
| Fields | Comma-separated list of fields to return from the relation record (e.g., id,type,estateid,addressid). |
Output
The output JSON contains the following structure:
success: Boolean indicating if the operation was successful.resourceType: The resource involved, here always"relation".operation: The operation performed, here"get".data: An array of relation records matching the query. For the "Get" operation, this will typically contain one relation object with the requested fields.total(optional): Total number of records returned (mainly relevant for multi-record queries).
Example output snippet:
{
"success": true,
"resourceType": "relation",
"operation": "get",
"data": [
{
"id": "123",
"type": "owner",
"estateid": "456",
"addressid": "789"
}
]
}
No binary data output is produced by this node.
Dependencies
- Requires an API token and secret for authenticating with the OnOffice API.
- Needs the OnOffice API credentials configured in n8n.
- Makes HTTP POST requests to the OnOffice API endpoint:
https://api.onoffice.de/api/v1.
Troubleshooting
- Invalid JSON in Fields or Filter: If the "Fields" or any filter JSON is malformed, the node throws an error indicating invalid JSON. Ensure these inputs are correctly formatted.
- Missing or Invalid Relation ID: The "Relation ID" property is required for the "Get" operation. Omitting it or providing an incorrect ID will cause errors.
- API Errors: If the OnOffice API returns an error, the node surfaces the message. Common causes include invalid credentials, insufficient permissions, or non-existent relation IDs.
- Network Issues: Network connectivity problems result in network error messages. Verify internet access and API availability.
- Unsupported Resource or Operation: Attempting to use unsupported combinations will throw explicit errors.
To resolve errors:
- Double-check all input parameters for correctness.
- Confirm API credentials are valid and have necessary permissions.
- Validate JSON inputs using external tools before pasting.
- Review API documentation for correct field names and usage.
Links and References
- OnOffice API Documentation (general reference for API endpoints and data structures)
- n8n Documentation on Creating Custom Nodes