Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Overview

This node integrates with the Pohoda accounting system to perform various operations such as exporting data, creating entities, retrieving company information, and printing reports. Specifically, for the "Převod" resource with the "Print" operation, it allows users to print transfer documents between accounts by specifying the record and report IDs. The node sends XML requests to the Pohoda API, handles responses including PDF printouts, and can save or delete generated files.

Common scenarios include:

  • Automating the printing of transfer documents from Pohoda directly within an n8n workflow.
  • Generating PDF reports of specific records for archiving or distribution.
  • Integrating Pohoda document printing into larger business automation processes.

Example use case:

  • A finance team wants to automatically print transfer slips after they are created in Pohoda, saving the PDF locally and optionally deleting the file after printing.

Properties

Name Meaning
ID záznamu (recordId) The row ID of the item/record to print.
ID sestavy (reportId) Identifier of the report template to use for printing. This value is found in the report's properties.
Název/cesta k souboru (fileName) File path and name where the printed output (PDF) will be saved. Defaults to "n8n.pdf".
XML Output (xmlOutput) Boolean flag indicating whether to return raw XML output instead of parsed JSON.
UTF8 Conversion (utfConvert) Boolean flag to convert response encoding from Windows-1250 to UTF-8. Defaults to true.
Delete File After Print (deleteFile) Boolean flag to delete the saved file after printing. Defaults to true.

Output

The node outputs data depending on the settings:

  • If xmlOutput is enabled, the node returns the raw XML response from the Pohoda API in the json.data field.
  • Otherwise, for the print operation, if a PDF printout is generated, the node outputs:
    • JSON containing print details metadata.
    • Binary data containing the PDF file (mimeType: application/pdf, file extension .pdf, and original filename).
  • For other operations, the node outputs parsed JSON objects representing the requested data or confirmation of created entities.

Dependencies

  • Requires an API authentication credential with access to the Pohoda API.
  • Uses HTTP POST requests with Basic Authentication to communicate with the Pohoda XML endpoint.
  • Uses 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

  • Authentication errors: Ensure the API key or username/password credentials are correctly set up and have sufficient permissions.
  • Invalid report or record IDs: Verify that the provided recordId and reportId exist in Pohoda and are correct.
  • Encoding issues: If the output contains garbled characters, check the UTF8 Conversion setting; toggling it may resolve encoding mismatches.
  • File handling errors: If the node fails to save or delete files, verify file system permissions and paths.
  • API errors: The node throws errors if the Pohoda API response state is not "ok", including detailed messages from the API. Review these messages to adjust request parameters accordingly.

Links and References

Discussion