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 is useful for workflows that need to fetch lists of contacts or addresses, such as syncing contact databases, generating mailing lists, or filtering contacts by certain attributes.

For example, you can use this node to:

  • Retrieve a list of all addresses with specific fields like name and email.
  • Apply filters to get only addresses matching certain conditions.
  • Limit the number of results returned and paginate through large datasets using offset.

Properties

Name Meaning
Fields Comma-separated list of fields to return for each address (e.g., id,name,vorname,email).
Additional Fields Collection of optional parameters:
- Filter JSON object defining filter criteria to narrow down the query results.
- Limit Maximum number of address records to return (default 50).
- Offset Number of records to skip before starting to return results (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 containing the requested fields.
  • total (optional): Total number of matching records available in the system (if provided by the API).

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

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

No binary data is output by this node.

Dependencies

  • Requires an API token and secret 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 these credentials in n8n is necessary for successful operation.

Troubleshooting

  • Invalid JSON in Filter: If the filter field contains invalid JSON, the node throws an error stating "Filter must be a valid JSON". Ensure the filter input is correctly formatted JSON.
  • Invalid JSON in Data: For create or 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 credentials and request parameters.
  • Network Issues: Network failures result in "Network error" messages. Verify network connectivity and API endpoint accessibility.
  • Unsupported Resource or Operation: If the resource or operation is not supported, the node throws descriptive errors.
  • Pagination: When retrieving many records, ensure the limit and offset are set appropriately to avoid missing or duplicating data.

Links and References

Discussion