Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Overview

The node integrates with the Pohoda accounting system, specifically supporting various operations including exporting data, creating entities, retrieving company info, and printing reports. For the "Zásoby" (Stock) resource with the "Print" operation, it allows users to print a specific report related to stock items by specifying the record ID and report ID. The node sends XML requests to the Pohoda API, handles responses, and can save or return generated PDF files from print jobs.

This node is beneficial in scenarios where automated generation and printing of stock-related reports are needed within workflows, such as inventory audits, stock movement documentation, or compliance reporting. For example, a user can automate printing a stock inventory report for a particular item or batch directly from n8n without manual intervention.

Properties

Name Meaning
ID záznamu Item Row ID — identifies the specific stock record to print
ID sestavy Report Identifier — specifies which report template to use; found in the report's properties
Název/cesta k souboru File path and name where the printed report will be saved (default: "n8n.pdf")
XML Output Boolean flag to return raw XML response instead of parsed data
UTF8 Conversion Boolean flag to convert response encoding from Windows-1250 to UTF-8
Delete File After Print Boolean flag indicating whether to delete the saved file after printing

Output

The node outputs JSON data representing the response from the Pohoda API. For the print operation on the "Zásoby" resource:

  • If XML Output is enabled, the output contains the raw XML response as a string in the data field.
  • Otherwise, if the response includes a printable document, the node outputs a binary file attachment containing the PDF data of the printed report. This binary data includes:
    • data: The PDF file content encoded as binary.
    • mimeType: Set to "application/pdf".
    • fileExtension: "pdf".
    • fileName: The filename as returned by the API.
  • If no binary data is present, the node outputs parsed JSON details of the print response.

The output is paired with the input item index to maintain correspondence.

Dependencies

  • Requires an API key credential for authenticating with the Pohoda API.
  • Uses HTTP POST requests to the Pohoda XML endpoint for sending commands.
  • Handles character encoding conversion from Windows-1250 to UTF-8 using an encoding library.
  • Requires proper configuration of the Pohoda API base URL and credentials in n8n.

Troubleshooting

  • Common issues:
    • Incorrect or missing report ID or record ID may cause the API to return errors.
    • Authentication failures due to invalid API credentials.
    • Encoding issues if UTF8 conversion is disabled but the response contains Windows-1250 characters.
    • File handling errors if the specified file path is invalid or inaccessible.
  • Error messages:
    • Errors returned by the Pohoda API are surfaced with their message notes.
    • Node throws errors if the API response state is not "ok".
  • Resolutions:
    • Verify that the report ID and record ID correspond to existing entries in Pohoda.
    • Ensure API credentials are correct and have sufficient permissions.
    • Enable UTF8 conversion if you encounter garbled characters.
    • Check file system permissions and paths for saving or deleting files.

Links and References

Discussion