Pohoda Node icon

Pohoda Node

Stormware Pohoda Integration Node

Overview

This node integrates with the Stormware Pohoda system, specifically supporting various operations including exporting data, creating entities, retrieving company info, and printing reports or documents. For the Interní doklady (Internal Documents) resource with the Print operation, the node generates a print request for a specified internal document and report, sends it to the Pohoda API, and handles the response.

Typical use cases include:

  • Automatically generating and printing internal company documents such as internal memos or records.
  • Exporting internal document data for further processing or archiving.
  • Integrating Pohoda document printing into automated workflows, e.g., printing an internal document PDF after creation.

Example: You want to print an internal document report by specifying the document's row ID and the report template ID, saving the output PDF to a file path, optionally deleting the file after printing.

Properties

Name Meaning
ID záznamu (recordId) The row ID of the internal document record to print.
ID sestavy (reportId) Identifier of the report template to use for printing. This value is found in the report properties.
Název/cesta k souboru (fileName) File path and name where the printed output will be saved (e.g., "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 encoding from Windows-1250 to UTF-8 for the response data.
Delete File After Print (deleteFile) Boolean flag to delete the generated file after printing is completed.

Output

The node outputs data depending on the xmlOutput property:

  • If xmlOutput is true, the node returns the raw XML response from the Pohoda API in the json.data field.
  • Otherwise, it parses the response and:
    • If the response contains printable PDF data, it outputs a binary attachment with:
      • data: the PDF file content,
      • mimeType: "application/pdf",
      • fileExtension: "pdf",
      • fileName: the original filename from the response.
    • Additionally, it outputs JSON metadata about the print details.

Thus, the output includes either structured JSON print details or raw XML, plus optionally a binary PDF file representing the printed document.

Dependencies

  • Requires an API key credential for authenticating with the Pohoda API.
  • Uses HTTP POST requests to the Pohoda XML endpoint for sending print requests.
  • Uses encoding conversion library to handle Windows-1250 encoded responses.
  • Requires proper configuration of the Pohoda API base URL and credentials in n8n.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Invalid recordId or reportId may result in errors from the Pohoda API indicating the document or report was not found.
    • File system permission issues when saving the output PDF file.
    • Encoding problems if utfConvert is disabled but the response contains Windows-1250 characters.
  • Error messages:

    • Errors returned from the Pohoda API are surfaced with their message notes.
    • If the response state is not "ok", the node throws an error with the provided note.
    • Network or HTTP errors during the request will also cause execution failure unless "Continue On Fail" is enabled.
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm that the recordId and reportId correspond to existing entries in Pohoda.
    • Ensure the file path specified in fileName is writable.
    • Enable UTF8 conversion if you see garbled characters in the output.

Links and References


If you need details on other resources or operations, please provide their names.

Discussion