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 supporting operations on various resources including "Adresy" (Addresses). The Print operation for the "Adresy" resource allows users to generate and print reports based on specific address book records. This is useful in scenarios where you need to produce printable documents or reports from your address data stored in Pohoda, such as contact lists or address summaries.
Practical examples:
- Printing a detailed report of a single address book entry by specifying its record ID and a report template.
- Generating a PDF file of an address report and optionally deleting the file after printing.
- Exporting the report either as raw XML output or as a PDF binary file.
Properties
Name | Meaning |
---|---|
ID záznamu (recordId ) |
Item Row ID - the identifier of the specific address book record to print. |
ID sestavy (reportId ) |
Report Identifier - the ID of the report template to use for printing. Found in report properties. |
Název/cesta k souboru (fileName ) |
File path and name where the generated report will be saved (default: n8n.pdf ). |
XML Output (xmlOutput ) |
Boolean flag to return the raw XML response instead of processed output. |
UTF8 Conversion (utfConvert ) |
Boolean flag to convert the response encoding from Windows-1250 to UTF-8 (default: true). |
Delete File After Print (deleteFile ) |
Boolean flag indicating whether to delete the generated file after printing (default: true). |
Output
The node outputs JSON data and may also output binary data depending on the operation and settings:
- For the Print operation on "Adresy":
- If
xmlOutput
is enabled, the node returns the raw XML response as a string in thejson.data
field. - Otherwise, if the response contains printable PDF data, it outputs a binary file under
binary.data
with:data
: The PDF file content (base64 encoded).mimeType
:"application/pdf"
.fileExtension
:"pdf"
.fileName
: The original filename from the response.
- Additionally, JSON fields contain print details metadata extracted from the response.
- If
Dependencies
- Requires an API key credential for authenticating with the Pohoda API.
- Uses HTTP POST requests to Pohoda's
/xml
endpoint for sending XML requests. - 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
Common issues:
- Incorrect or missing API credentials will cause authentication failures.
- Invalid
recordId
orreportId
values may result in errors from the Pohoda API indicating missing or invalid data. - File write permissions or invalid
fileName
paths can cause failures when saving the generated report. - Encoding issues if
utfConvert
is disabled but the response contains Windows-1250 encoded characters.
Error messages:
- Errors returned from the Pohoda API are surfaced with messages from the response's
@note
attribute. - Node API errors occur if the response state is not "ok".
- To resolve, verify credentials, ensure correct IDs, and check file path validity.
- Errors returned from the Pohoda API are surfaced with messages from the response's
Links and References
- Pohoda API Documentation (official developer resources)
- n8n HTTP Request Node Documentation (for understanding HTTP request usage)
- iconv-lite npm package (used for character encoding conversions)
This summary focuses on the "Adresy" resource and the "Print" operation as requested, describing the input parameters, output structure, dependencies, and potential troubleshooting points based on static analysis of the provided source code and property definitions.