Actions30
Overview
This node integrates with the OnOffice API to perform operations on various resources, including "Relation". Specifically for the "Get" operation on the "Relation" resource, it retrieves a single relation record by its ID. This is useful when you need to fetch detailed information about a specific relation entity stored in OnOffice, such as a client or contact record.
Common scenarios include:
- Fetching contact details before processing or updating them.
- Retrieving relation data to display or use in workflows that depend on client information.
- Debugging or auditing relation records by retrieving their current state.
Example: You want to get the details of a relation with ID "12345" to send a personalized email or update related records in another system.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the relation record to retrieve. Required for "get", "update", and "delete" operations. |
| Include Debug Info | Boolean flag indicating whether to include detailed debug information (raw API response, request sent, URL) in the output. Useful for troubleshooting API calls. |
Output
The node outputs JSON data structured as follows:
When Include Debug Info is false (default):
{ "success": true, "resourceType": "relation", "operation": "get", "data": [] }success: Indicates if the API call was successful.resourceType: The resource involved ("relation").operation: The operation performed ("get").data: An array containing the retrieved relation record(s). The exact structure depends on the OnOffice API response for the relation resource.
When Include Debug Info is true:
{ "debug": true, "rawResponse": { /* full raw API response object */ }, "requestSent": { /* full request payload sent to API */ }, "url": "https://api.onoffice.de/api/latest/api.php" }This includes detailed debugging information helpful for development or troubleshooting.
The node does not output binary data.
Dependencies
- Requires an API token and secret credential for authenticating with the OnOffice API.
- Uses the OnOffice API endpoints:
- For "relation" resource with "getMany" operation:
https://api.onoffice.de/api/stable/api.php - For other cases including "get" on "relation":
https://api.onoffice.de/api/latest/api.php
- For "relation" resource with "getMany" operation:
- The node internally generates HMAC signatures for secure API requests.
- No additional external dependencies beyond the OnOffice API and configured credentials.
Troubleshooting
Common issues:
- Invalid or missing ID parameter will cause the API to fail to find the record.
- Incorrect or expired API credentials will result in authentication errors.
- Network connectivity problems can cause request failures.
- API rate limits or server errors may return error status codes.
Error messages:
"OnOffice API error: <message>"indicates the API returned an error. Check the message for specifics like invalid ID or authentication failure.- If the node throws an error but Continue On Fail is enabled, the output will contain
success: falseand the error message for easier handling in workflows.
Resolution tips:
- Verify the ID value is correct and exists in OnOffice.
- Ensure API credentials are valid and have necessary permissions.
- Enable "Include Debug Info" to get detailed request/response data for diagnosing issues.
- Check network connectivity and retry if transient errors occur.
Links and References
- OnOffice API Documentation (official API docs)
- n8n documentation on HTTP Request node for understanding underlying HTTP calls
- General info on HMAC signatures for API security: https://en.wikipedia.org/wiki/HMAC