OnOffice icon

OnOffice

Consume OnOffice API

Overview

This node integrates with the OnOffice API to perform CRUD (Create, Read, Update, Delete) operations on various resources including "IDs From Relation". Specifically for the "Update" operation on the "IDs From Relation" resource, it updates a record identified by its ID with new data.

Common scenarios where this node is useful include:

  • Automating updates to real estate-related records stored in OnOffice.
  • Synchronizing external systems with OnOffice data by programmatically modifying records.
  • Managing relations and their associated IDs efficiently without manual intervention.

For example, you might use this node to update contact information or related identifiers linked to a relation entity in your OnOffice database.

Properties

Name Meaning
ID The unique identifier of the record to update. Required for update operations.
Include Debug Info Boolean flag to include detailed debug information in the output, useful for troubleshooting.

Output

The node outputs JSON data structured as follows:

  • On success:

    • success: true
    • resourceType: the resource name (e.g., "idsfromrelation")
    • operation: the performed operation ("update")
    • data: an array containing the response data from the API (empty array if no data returned)
  • If "Include Debug Info" is enabled, the output includes:

    • debug: true
    • rawResponse: the full raw response from the OnOffice API
    • requestSent: the exact request payload sent to the API
    • url: the API endpoint URL used
  • On failure (if "Continue On Fail" is enabled):

    • success: false
    • error: error message describing what went wrong
    • resourceType and operation fields are also included for context

The node does not output binary data.

Dependencies

  • Requires an API token credential for authenticating with the OnOffice API.
  • Uses the OnOffice API endpoints:
    • Stable API: https://api.onoffice.de/api/stable/api.php (used only for "relation" resource with "getMany" operation)
    • Latest API: https://api.onoffice.de/api/latest/api.php (used for all other cases)
  • The node internally generates HMAC signatures for secure API requests using the provided API token and secret.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing an incorrect or non-existent ID for update operations will result in API errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • "OnOffice API error: <message>" indicates the API responded with an error status. Check the message for details.
    • If the node throws errors related to request signing or parameters, verify that the API token and secret are correctly configured.
  • How to resolve:

    • Ensure valid API credentials are set up in n8n.
    • Double-check the ID value corresponds to an existing record.
    • Enable "Include Debug Info" to get detailed request and response data for diagnosing issues.
    • Use the "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion