Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Účetní deník (PÚ) → Print

AI-generated

Overview

This node integrates with the Stormware Pohoda accounting system, specifically supporting operations such as exporting data, creating entities, retrieving company info, and printing reports. The "Print" operation for the resource "Účetní deník (PÚ)" (Accounting Journal) allows users to generate and print specific reports from Pohoda by specifying record and report IDs, saving the output to a file, optionally returning XML output, and controlling file deletion after printing.

Common scenarios include:

  • Automating the generation and printing of accounting journal reports.
  • Exporting various accounting and business documents from Pohoda.
  • Creating new entities like address book entries in Pohoda.
  • Retrieving company information for integration or reporting purposes.

Practical example:
A user wants to print a specific accounting journal report identified by a record ID and report ID, save it as a PDF named "n8n.pdf", and automatically delete the file after printing. This node facilitates that by sending the appropriate request to Pohoda's API and handling the response.

Properties

Name Meaning
ID záznamu Item Row ID - identifies the specific record to print
ID sestavy Report Identifier - the ID of the report to print, found in the report 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 output instead of processed data
UTF8 Conversion Boolean flag to convert encoding from Windows-1250 to UTF-8
Delete File After Print Boolean flag indicating whether to delete the generated file after printing (default: true)

Output

The node outputs JSON data and may also output binary data depending on the operation:

  • For the "Print" operation:

    • If XML Output is enabled, the node returns the raw XML response as a string in the json.data field.
    • Otherwise, if the response contains printable PDF data, it outputs this as binary data with MIME type application/pdf, including the file name and extension.
    • The JSON part includes print details metadata extracted from the response.
  • For other operations (export, create, company-info), the node outputs structured JSON objects representing the requested data or confirmation of created entities.

Dependencies

  • Requires an API authentication credential with username and password for Pohoda's API.
  • Uses HTTP requests to communicate with Pohoda's XML API endpoints.
  • Depends on external libraries bundled within the node for XML building/parsing and character encoding conversion.
  • No additional environment variables are explicitly required beyond the API credentials.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing invalid record or report IDs may result in errors from the Pohoda API.
    • Encoding issues might arise if UTF8 conversion is disabled but the response contains Windows-1250 encoded characters.
    • File write permissions or invalid file paths can cause failures when saving the printed report.
  • Error messages:

    • Errors returned from Pohoda API are surfaced with their message notes.
    • Node API errors indicate problems with request formation or response validation.
    • To resolve, verify credentials, ensure correct IDs, check file paths, and enable UTF8 conversion if encoding issues occur.

Links and References

Discussion