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
Prodejky → Print
AI-generatedOverview
This node integrates with the Pohoda accounting system, specifically supporting operations such as exporting data, creating entities, retrieving company info, and printing reports or documents. The "Print" operation for the "Prodejky" (Sales receipts) resource allows users to generate and print sales receipt documents based on a specified record ID and report template.
Typical use cases include:
- Automatically generating PDF printouts of sales receipts from Pohoda for record keeping or customer delivery.
- Exporting various accounting and business data from Pohoda for further processing or reporting.
- Creating new entities in Pohoda such as address book entries.
- Retrieving company information directly from Pohoda.
For example, a user can specify a sales receipt record ID and a report template ID to print a PDF file of that receipt, optionally deleting the file after printing.
Properties
| Name | Meaning |
|---|---|
| ID záznamu | Item Row ID — the identifier of the specific sales receipt 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 (e.g., PDF) will be saved |
| XML Output | Boolean flag to output raw XML response instead of parsed JSON |
| 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 an array of items corresponding to each input item processed.
- For the "Print" operation on "Prodejky":
- If
XML Outputis enabled, the output contains a JSON fielddatawith the raw XML response string. - Otherwise, the output includes:
- A JSON object representing the print details returned by Pohoda.
- A binary field named
datacontaining the PDF file data of the printed document, with metadata:mimeType:"application/pdf"fileExtension:"pdf"fileName: the original filename from the response
- If
- For other operations, the output JSON contains parsed response objects from Pohoda.
Dependencies
- Requires an API authentication credential with Pohoda (username and password).
- Uses HTTP requests to Pohoda's XML API endpoints.
- Depends on external libraries for XML building/parsing and character encoding conversion.
- Requires n8n environment configured with the Pohoda API credentials.
Troubleshooting
Common issues:
- Incorrect or missing API credentials will cause authentication failures.
- Invalid or missing report ID or record ID parameters may result in errors or empty responses.
- Encoding issues if UTF8 conversion is disabled but response contains Windows-1250 encoded characters.
- File write permissions or invalid file paths may cause failures when saving the print file.
Error messages:
- Errors with messages from Pohoda API are thrown if the response state is not "ok".
- Network or HTTP errors during requests will throw standard n8n node errors.
- To resolve, verify credentials, parameter correctness, and network connectivity.
Links and References
- Pohoda XML API documentation (official site, if available)
- n8n documentation on custom nodes and HTTP request usage
- iconv-lite library for encoding conversions: https://github.com/ashtuchkin/iconv-lite
- xmlbuilder2 library for XML parsing and building: https://github.com/oozcitak/xmlbuilder2
