Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Overview

The node integrates with the Stormware Pohoda accounting system, enabling various operations such as exporting data, creating entities, retrieving company info, and printing reports. Specifically for the "Faktury" (Invoices) resource with the "Print" operation, the node allows users to print a specified report related to an invoice or other document by providing identifiers and output options.

This node is beneficial in automating interactions with Pohoda, such as generating printable PDF reports of invoices or other documents directly from workflows. For example, a user can automate printing an invoice report after it is created or updated in Pohoda, saving the report as a PDF file and optionally deleting the file after printing.

Properties

Name Meaning
ID záznamu Item Row ID — the identifier of the 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 will be saved (default: "n8n.pdf")
XML Output Boolean flag indicating whether to return raw XML output instead of parsed response
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

Output

The node outputs JSON data representing the response from the Pohoda API. When the "XML Output" property is enabled, the raw XML response string is returned in the json.data field.

For the print operation, if the response contains printable data, the node outputs a binary file attachment representing the generated PDF report. This binary data includes:

  • data: The PDF file content encoded as binary.
  • mimeType: Set to "application/pdf".
  • fileExtension: Set to "pdf".
  • fileName: The filename of the PDF as returned by the Pohoda API.

If no binary data is returned, the node outputs the parsed JSON representation of the print details.

Dependencies

  • Requires an API key credential for authenticating with the Pohoda API.
  • Uses HTTP requests to communicate with the Pohoda XML API endpoint.
  • Utilizes external libraries for XML building/parsing and character encoding conversion.
  • The node expects the Pohoda API base URL and credentials to be configured in n8n 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 occur if UTF8 conversion is disabled but the response contains Windows-1250 encoded characters.
    • File write permissions or invalid file paths could cause failures when saving the PDF file.
  • Error messages:

    • Errors with messages from the Pohoda API response note (@note attribute) indicate specific problems reported by the server, such as invalid parameters or access issues.
    • Node API errors are thrown if the response state is not "ok".
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm that the record and report IDs exist and are correct.
    • Enable UTF8 conversion if you encounter character encoding problems.
    • Ensure the file path for saving PDFs is valid and writable.
    • Use the "Delete File After Print" option carefully to avoid accidental deletion of important files.

Links and References

Discussion