OnOffice

Consume OnOffice API

Actions12

Overview

This node integrates with the OnOffice API to manage address records. Specifically, the Address - Get Many operation retrieves multiple address entries from the OnOffice system based on specified criteria. It allows users to fetch a list of addresses with control over which fields to return, filtering conditions, pagination limits, and offsets.

Common scenarios where this node is beneficial include:

  • Synchronizing address/contact data from OnOffice into other systems.
  • Bulk retrieval of contact information for reporting or mailing lists.
  • Filtering addresses by specific criteria (e.g., city, email domain) before processing.

Example use case: A real estate agency wants to export all client addresses with their names and emails who match certain filter criteria, limiting results to 100 entries per request.

Properties

Name Meaning
Fields Comma-separated list of address fields to return. Example: id,name,vorname,email
Additional Fields Collection of optional parameters:
- Filter JSON object defining filter criteria to narrow down the query results. Must be valid JSON.
- Limit Maximum number of address records to return (default 50).
- Offset Number of records to skip before starting to return results (default 0). Useful for pagination.

Output

The node outputs a JSON array where each item contains:

  • success: Boolean indicating if the API call was successful.
  • resourceType: The resource type, here always "address".
  • operation: The operation performed, here "getMany".
  • data: An array of address records matching the query. Each record includes the requested fields.
  • total (optional): Total count of matching records available in OnOffice (if provided by API metadata).
  • message (optional): Status message from the API response.

If an error occurs and "Continue On Fail" is enabled, output items will contain:

  • success: false
  • error: Error message string
  • resourceType and operation as above

No binary data is returned by this node.

Dependencies

  • Requires an API token credential for authenticating with the OnOffice API.
  • The node makes HTTP POST requests to the OnOffice API endpoint at https://api.onoffice.de/api/latest/api.php.
  • Proper configuration of the API credentials within n8n is necessary.

Troubleshooting

  • Invalid JSON in Filter: If the filter field contains invalid JSON, the node throws an error: "Filter must be a valid JSON". Ensure the filter input is correctly formatted JSON.
  • Invalid JSON in Data: For create/update operations (not relevant here but part of the node), invalid JSON in the data field causes errors.
  • API Errors: If the OnOffice API returns an error, the node surfaces the message prefixed with "OnOffice API error:". Check the API token validity and request parameters.
  • Network Issues: Network failures result in "Network error" messages. Verify internet connectivity and API endpoint accessibility.
  • Unsupported Resource/Operation: Using unsupported combinations leads to explicit errors indicating the unsupported resource or operation.

Links and References

Discussion