OnOffice icon

OnOffice

Consume OnOffice API

Overview

This node integrates with the OnOffice API to manage various resources such as estates, addresses, agent logs, relations, and tasks. Specifically for the Task - Create operation, it allows users to create a new task record in the OnOffice system. This is useful in scenarios where you want to automate task creation based on triggers or workflows, such as scheduling follow-ups, reminders, or logging activities related to real estate management.

For example, when a new property lead is added, this node can automatically create a task assigned to an agent to contact the lead.

Properties

Name Meaning
Include Debug Info Whether to include detailed debug information in the output (e.g., raw API response).

Output

The node outputs JSON data structured as follows:

  • If Include Debug Info is enabled:

    • 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.
  • Otherwise:

    • success: true indicating the operation succeeded.
    • resourceType: The resource acted upon (here, "task").
    • operation: The operation performed (here, "create").
    • data: An array containing the result data (empty in this implementation).

If the API returns an error or the operation fails, the node either throws an error or outputs a JSON object with success: false, including the error message, depending on the workflow's error handling settings.

The node does not output binary data.

Dependencies

  • Requires an API authentication token and secret credential for the OnOffice API.
  • Uses the OnOffice API endpoints:
    • Stable API: https://api.onoffice.de/api/stable/api.php (only for relation-getMany)
    • Latest API: https://api.onoffice.de/api/latest/api.php (used for Task create)
  • Relies on helper functions to generate HMAC signatures for request authentication.
  • Requires n8n HTTP Request helper for making POST requests.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect resource or operation parameters may lead to API errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • "OnOffice API error: <message>" indicates the API returned an error status. Check the message for details.
    • If the node outputs { success: false, error: "<message>" }, review the error message and verify input parameters and credentials.
  • Resolution tips:

    • Ensure valid API token and secret are configured in the node credentials.
    • Verify that required parameters like resource type and operation are correctly set.
    • Enable "Include Debug Info" to get detailed request and response data for troubleshooting.

Links and References

Discussion