Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Overview

This node integrates with the Pohoda accounting system, specifically supporting multiple operations including exporting data, creating entities, retrieving company info, and printing reports. The "Print" operation for the "Prodejní ceny" (Selling Prices) resource allows users to generate and print reports based on a specific record and report ID. It can save the generated report as a PDF file locally, optionally delete the file after printing, or output XML data.

Common scenarios include:

  • Automatically generating and printing price lists or sales price reports from Pohoda.
  • Archiving printed reports as PDF files in workflows.
  • Exporting report data in XML format for further processing or integration.

Example use case:
A business wants to automate printing updated selling price reports daily. This node can request the report by its ID, save it as a PDF, send it to a printer, and then delete the temporary file automatically.

Properties

Name Meaning
ID záznamu Item Row ID — identifies the specific record to print
ID sestavy Report ID — identifier of the report to print; found in the report's properties
Název/cesta k souboru File name/path — path and filename where the printed report PDF will be saved
XML Output Boolean flag to output raw XML data instead of processed response
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 PDF file after printing

Output

The node outputs JSON and optionally binary data depending on the settings:

  • If XML Output is enabled, the node returns the raw XML response as a string in the json.data field.
  • Otherwise, if the print response contains PDF attachments, the node outputs:
    • JSON metadata about the print details.
    • Binary data containing the PDF file (data), with MIME type application/pdf, file extension .pdf, and the original filename.
  • If no PDF attachment is present, the node outputs parsed JSON objects extracted from the response.

The binary output can be used downstream to save the PDF file, send it via email, or print it.

Dependencies

  • Requires an API key credential for authenticating with the Pohoda API.
  • Uses HTTP POST requests to Pohoda's XML endpoint.
  • Handles character encoding conversion from Windows-1250 to UTF-8 using the iconv-lite library.
  • Uses XML building and parsing libraries (xmlbuilder2) to construct requests and parse responses.
  • Requires proper configuration of the Pohoda API base URL and credentials in n8n.

Troubleshooting

  • Authentication errors: Ensure the API credentials (username and password) are correct and have sufficient permissions.
  • Invalid report or record IDs: Verify that the provided recordId and reportId exist and are correct in Pohoda.
  • Encoding issues: If the output appears garbled, check the UTF8 Conversion setting; disabling it may help if your environment expects Windows-1250 encoding.
  • File handling errors: If the node fails to save or delete the PDF file, verify file system permissions and that the specified path is valid.
  • API errors: The node throws errors if the Pohoda API response state is not "ok". The error message from the API is included and should guide troubleshooting.

Links and References

Discussion