Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Objednávky → Print

AI-generated

Overview

This node integrates with the Pohoda accounting system, enabling various operations such as exporting data, creating entities, retrieving company info, and printing reports. Specifically for the "Objednávky" (Orders) resource with the Print operation, the node allows users to print a specific order report by providing identifiers and file details. This is useful in scenarios where automated generation and printing of order documents are needed, such as generating PDF invoices or order confirmations directly from Pohoda.

Practical examples:

  • Automatically print an order confirmation PDF after an order is created.
  • Generate and save a report of a specific order for record-keeping or sending to customers.
  • Automate batch printing of multiple orders by iterating over order IDs.

Properties

Name Meaning
ID záznamu Item Row ID — the unique identifier of the order record to print.
ID sestavy Report ID — identifier of the report template to use for printing; found in report properties.
Název/cesta k souboru File name/path — destination path and filename where the printed report will be saved (e.g., "n8n.pdf").
XML Output Boolean flag indicating whether to output raw XML response instead of parsed data.
UTF8 Conversion Boolean flag to convert encoding from Windows-1250 to UTF-8 for proper character representation.
Delete File After Print Boolean flag indicating whether to delete the generated file after printing is completed.

Output

The node outputs JSON data representing the result of the print request. If the XML Output property is enabled, the raw XML response string is returned in the json.data field.

Otherwise, if the print response contains PDF data, the node outputs it as binary data with the following structure:

  • binary.data: The PDF file content.
  • binary.data.mimeType: "application/pdf".
  • binary.data.fileExtension: "pdf".
  • binary.data.fileName: The original filename of the PDF attachment.

Additionally, the JSON part includes print details metadata extracted from the response.

If no PDF is returned, the node outputs parsed JSON objects representing the print response details.

Dependencies

  • Requires an API key credential for authenticating with the Pohoda API.
  • Uses HTTP POST requests to Pohoda's XML endpoint for communication.
  • Handles Windows-1250 encoded responses and optionally converts them to UTF-8.
  • Relies on XML building and parsing libraries internally.
  • No additional external services beyond Pohoda API are required.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing invalid or non-existent recordId or reportId may result in errors from the Pohoda API.
    • File path issues when saving the PDF (e.g., permissions or invalid paths) could cause failures.
    • Encoding problems if UTF8 conversion is disabled but response contains special characters.
  • Error messages:

    • Errors with messages from Pohoda API (@note field) indicate issues like invalid parameters or server-side errors.
    • Node API errors thrown when the response state is not "ok".
    • HTTP request failures due to network or authentication issues.
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm that recordId and reportId correspond to valid existing records and reports.
    • Ensure the file path specified in fileName is writable.
    • Enable UTF8 conversion if you encounter character encoding issues.

Links and References

Discussion