OnOffice icon

OnOffice

Consume OnOffice API

Agent Log → Update

AI-generated

Overview

This node integrates with the OnOffice API to perform various operations on different resources such as estates, addresses, agent logs, relations, tasks, and IDs from relations. Specifically, for the Agent Log resource with the Update operation, it updates an existing agent log record identified by its ID.

Common scenarios where this node is useful include automating updates to agent log entries in a real estate management system, such as modifying notes, statuses, or timestamps related to agent activities. For example, after processing some data externally, you might want to update the corresponding agent log entry automatically without manual intervention.

Properties

Name Meaning
ID The unique identifier of the agent log record to update. This is required.
Include Debug Info Boolean flag to include detailed debug information in the output, useful for troubleshooting.

Output

The node outputs a JSON object containing the result of the update operation. The structure includes:

  • success: A boolean indicating if the update was successful.
  • resourceType: The resource involved, here "agentslog".
  • operation: The operation performed, here "update".
  • data: An array which would typically contain the updated record details (empty in current implementation).
  • If Include Debug Info is enabled, additional fields are included:
    • 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.

If an error occurs and the node is set to continue on failure, the output will include:

  • success: false
  • error: The error message describing what went wrong.
  • resourceType and operation for context.

The node does not output binary data.

Dependencies

  • Requires valid credentials for the OnOffice API, specifically an API token and secret.
  • The node uses the OnOffice API endpoints:
    • Stable API: https://api.onoffice.de/api/stable/api.php (used only for relation getMany)
    • Latest API: https://api.onoffice.de/api/latest/api.php (used for other requests including agent log update)
  • The node internally generates HMAC signatures for authentication using the provided API token and secret.
  • No additional external dependencies beyond the OnOffice API and n8n's HTTP request helper.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing an incorrect or non-existent ID for the agent log record will result in an API error.
    • Network connectivity issues can prevent reaching the OnOffice API endpoint.
    • If the API returns an error status code, the node throws an error with the message from the API.
  • Error messages:

    • "OnOffice API error: <message>" indicates the API responded with an error. Check the message for details.
    • "Unknown error" may indicate unexpected API response format or network issues.
  • Resolutions:

    • Verify that the API token and secret are correctly configured in the node credentials.
    • Confirm the ID corresponds to an existing agent log 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

  • OnOffice API Documentation (official API docs for reference)
  • n8n HTTP Request Node documentation for understanding HTTP calls within n8n workflows.

Discussion