Actions76
- Faktury Actions
- Příjemky Actions
- Prodejky Actions
- Objednávky Actions
- Výdejky Actions
- Pokladní doklady Actions
- Nabídky Actions
- Výroba Actions
- Interní doklady Actions
- Poptávky Actions
- Převod Actions
- Banka Actions
- Zakázky Actions
- Pohyby Actions
- Účetní deník (PÚ) Actions
- Adresy Actions
- Zásoby Actions
- Prodejní ceny Actions
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, the Print operation allows users to generate and print reports from Pohoda by specifying report and record IDs, saving the output to a file, and optionally deleting the file after printing.
This node is beneficial for automating interactions with Pohoda, such as exporting invoices or other financial documents, creating new records in Pohoda, fetching company details, or printing reports programmatically within an n8n workflow.
Practical example:
A user can automate printing a specific invoice report by providing the report ID and record ID, generating a PDF file saved locally or used downstream in the workflow, then optionally deleting the file after printing to keep the environment clean.
Properties
Name | Meaning |
---|---|
ID záznamu (recordId) | Item Row ID - identifies the specific record to print |
ID sestavy (reportId) | Report Identifier - specifies which report template to use for printing |
Název/cesta k souboru (fileName) | File path and name where the printed report will be saved (default: "n8n.pdf") |
XML Output (xmlOutput) | Boolean flag to return raw XML response instead of parsed JSON |
UTF8 Conversion (utfConvert) | Boolean flag to convert response encoding from Windows-1250 to UTF-8 |
Delete File After Print (deleteFile) | Boolean flag indicating whether to delete the generated file after printing |
Output
The node outputs data depending on the operation and settings:
- For the Print operation:
- If
xmlOutput
is true, the node returns the raw XML response as a string in thejson.data
field. - Otherwise, it returns a JSON object representing the print details extracted from the Pohoda response.
- If the response includes a PDF attachment (the printed report), it is returned as binary data with:
data
: The PDF file content (base64 encoded internally)mimeType
:"application/pdf"
fileExtension
:"pdf"
fileName
: The original filename from the response
- If
This allows subsequent nodes to access the printed report either as structured JSON or as a downloadable PDF file.
Dependencies
- Requires an API key credential for authenticating with the Pohoda API (username and password).
- 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 report or record IDs may result in errors from the Pohoda API.
- Encoding issues if the response is not properly converted from Windows-1250 to UTF-8.
- File write permissions or invalid file paths could prevent saving the printed report.
Error messages:
- Errors with messages from the Pohoda API response note (
@note
field) indicate issues like invalid parameters or server-side problems. - NodeApiError exceptions are thrown when the API response state is not "ok".
- To resolve, verify credentials, input parameters, and ensure the Pohoda service is accessible.
- Errors with messages from the Pohoda API response note (
Links and References
- Stormware Pohoda API Documentation (official resource for API details)
- n8n HTTP Request Node Documentation (for understanding HTTP communication)
- iconv-lite npm package (used for character encoding conversions)