Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Overview

This node integrates with the Pohoda accounting system, specifically enabling export operations for various data resources including orders ("Objednávky"). The Export operation allows users to retrieve records from Pohoda in XML or JSON format, filtered by criteria such as record ID range and date. This is useful for automating data synchronization, reporting, or backup tasks involving order data.

For example, a user can export issued orders starting from a specific record ID, limiting the number of records returned, and choose whether to receive the output as raw XML or parsed JSON. This facilitates integration with other systems or workflows that require up-to-date order information from Pohoda.

Properties

Name Meaning
Return Records Count (count) Number of records to return in the export (range 1 to 10000). Limits batch size.
Start Record ID (idFrom) Minimum record ID from which to start exporting. Filters out earlier records.
XML Output (xmlOutput) Boolean flag to return raw XML response instead of parsed JSON.
UTF8 Conversion (utfConvert) Boolean flag to convert encoding from Windows-1250 to UTF-8 for textual responses.

Output

The node outputs an array of items corresponding to the exported records:

  • If XML Output is enabled, each item contains a json field with a data property holding the raw XML string.
  • Otherwise, the XML response is parsed into JSON objects representing individual records, each emitted as a separate item under the json field.
  • In some cases (e.g., print operation), binary PDF data may be output with appropriate metadata (mimeType, fileExtension, fileName) under a binary field.

For the Export operation on Orders, the output JSON structure corresponds to the Pohoda API's response schema for order records, containing fields relevant to orders such as order details, status, dates, and related entities.

Dependencies

  • Requires an API authentication credential with access to the Pohoda system.
  • Uses HTTP POST requests to Pohoda's XML API endpoint.
  • Handles character encoding conversion from Windows-1250 to UTF-8 if enabled.
  • Utilizes helper functions to generate XML requests and parse XML responses.
  • Requires n8n environment configured with the necessary credentials and network access to Pohoda API.

Troubleshooting

  • Authentication errors: Ensure the API credentials are correct and have sufficient permissions.
  • Encoding issues: If special characters appear garbled, verify the UTF8 Conversion setting matches the expected encoding.
  • Request failures: Check network connectivity and the correctness of filter parameters like Start Record ID and Return Records Count.
  • Unsupported resource error: The node throws an error if the selected resource is not implemented for export; verify the resource name.
  • API response errors: If the Pohoda API returns a non-ok state, the node surfaces the error message from the response note.
  • Large exports: Exporting very large datasets may require batching using Return Records Count and Start Record ID to avoid timeouts.

Links and References

Discussion