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 Pohoda accounting system, specifically supporting various operations including exporting data, creating entities, retrieving company info, and printing reports. For the Výroba (Production) resource with the Print operation, the node generates a print request for a specified production record and report, sends it to the Pohoda API, and retrieves the resulting document (typically a PDF). This is useful for automating the generation and retrieval of production-related reports or documents directly from Pohoda.
Typical use cases include:
- Automatically printing production reports based on specific record IDs.
- Saving generated reports as PDF files in workflows.
- Optionally deleting the temporary file after printing to manage storage.
Properties
Name | Meaning |
---|---|
ID záznamu (recordId ) |
The row ID of the item/record to print. |
ID sestavy (reportId ) |
Identifier of the report template to use for printing. This value is found in the report's properties. |
Název/cesta k souboru (fileName ) |
File path and name where the printed report will be saved (e.g., "n8n.pdf"). |
XML Output (xmlOutput ) |
Boolean flag indicating whether to output raw XML response instead of processed data. |
UTF8 Conversion (utfConvert ) |
Boolean flag to convert encoding from Windows-1250 to UTF-8 for text responses. |
Delete File After Print (deleteFile ) |
Boolean flag to delete the generated file after printing to clean up temporary files. |
Output
The node outputs JSON and optionally binary data:
- If
xmlOutput
is enabled, the output contains a JSON object with adata
field holding the raw XML response string from the Pohoda API. - Otherwise, for the Print operation, the node returns the print details in JSON format along with a binary attachment representing the generated PDF file:
json
: Contains metadata about the print job and print details.binary.data
: Contains the PDF file data.data
: Binary content of the PDF.mimeType
: Always"application/pdf"
.fileExtension
: Always"pdf"
.fileName
: The filename of the PDF as returned by Pohoda.
This allows downstream nodes to access the PDF file directly for further processing, storage, or sending via email.
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 the
iconv-lite
library for character encoding conversion between Windows-1250 and UTF-8. - Uses
xmlbuilder2
for XML parsing and conversion. - 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
orreportId
may result in errors from the Pohoda API indicating that the requested report or record does not exist. - Encoding issues if
utfConvert
is disabled but the response contains Windows-1250 encoded characters. - File write permission errors if the specified
fileName
path is invalid or inaccessible.
Error messages:
- Errors returned from Pohoda API are surfaced with their message notes, e.g.,
"Not implemented for <resource>"
if an unsupported resource is used. - NodeApiError with messages from the API response if the state is not "ok".
- NodeOperationError if unexpected exceptions occur during execution.
- Errors returned from Pohoda API are surfaced with their message notes, e.g.,
Resolutions:
- Verify API credentials and permissions.
- Confirm that
recordId
andreportId
correspond to valid entries in Pohoda. - Enable
utfConvert
if you see garbled characters. - Ensure the file path in
fileName
is writable by n8n.
Links and References
- Pohoda API Documentation (official developer resources)
- iconv-lite npm package for encoding conversions
- xmlbuilder2 npm package for XML parsing and building