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
This node integrates with the Pohoda accounting system, specifically enabling operations such as exporting data, creating entities, retrieving company info, and printing reports or documents. The "Print" operation for the "Výdejky" (Issues) resource allows users to generate and print issue records from Pohoda, saving the output as a PDF file or optionally returning XML data.
Typical use cases include:
- Automatically generating printable issue documents (výdejky) for inventory or stock management.
- Archiving printed reports in PDF format within workflows.
- Integrating Pohoda document printing into automated business processes.
For example, a user can specify an issue record ID and report template ID to print a specific issue document, save it as a PDF, and optionally delete the file after printing.
Properties
Name | Meaning |
---|---|
ID záznamu | Item Row ID — the identifier of the specific issue record to print. |
ID sestavy | Report ID — identifier of the report template used for printing; found in report properties. |
Název/cesta k souboru | File name/path — path and filename where the generated print file (PDF) will be saved. |
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 in the response. |
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. Depending on the settings:
- If XML Output is enabled, the raw XML response string is returned in the
json.data
field. - Otherwise, if the print response contains PDF data, the node outputs a binary file with:
data
: the PDF file content,mimeType
:"application/pdf"
,fileExtension
:"pdf"
,fileName
: the original filename from the response.
- If no binary data is present, the node outputs parsed JSON objects extracted from the response.
This allows downstream nodes to access either the raw XML, structured JSON data, or the actual PDF file for further processing or storage.
Dependencies
- Requires connection credentials to the Pohoda API, including base URL, username, and password.
- Uses HTTP requests with Basic Authentication to communicate with the Pohoda server.
- Depends on external libraries for XML building/parsing and character encoding conversion.
- The node expects the Pohoda API to support specific XML request/response formats for printing and other operations.
Troubleshooting
- Authentication errors: Ensure that valid API credentials are configured and have sufficient permissions.
- Invalid report or record IDs: Verify that the provided reportId and recordId exist in Pohoda and correspond to the selected resource.
- Encoding issues: If the output contains garbled characters, try toggling the UTF8 Conversion property.
- File handling errors: If the file cannot be saved or deleted, check 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 correct request parameters or server-side issues.
Links and References
- Pohoda API documentation (official source for report IDs and XML request formats)
- n8n documentation on custom nodes and HTTP request usage
- XMLBuilder2 library: https://github.com/oozcitak/xmlbuilder2
- iconv-lite library for encoding conversions: https://github.com/ashtuchkin/iconv-lite