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, specifically supporting various operations including exporting data, creating entities, retrieving company info, and printing reports. For the Poptávky (Enquiries) resource with the Print operation, the node generates a print request for a specific enquiry record and report, sends it to the Pohoda API, and retrieves the resulting PDF file or XML output.
This node is beneficial in scenarios where automated generation and retrieval of official documents or reports from Pohoda are needed within an n8n workflow. For example, you can automatically print enquiry reports as PDFs for archiving or further processing, or retrieve XML data for integration with other systems.
Properties
Name | Meaning |
---|---|
ID záznamu (recordId ) |
The row ID of the item (enquiry) to be printed. |
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 generated print file (PDF) will be saved. Defaults to "n8n.pdf". |
XML Output (xmlOutput ) |
Boolean flag indicating whether to return the raw XML output instead of the PDF file. |
UTF8 Conversion (utfConvert ) |
Boolean flag to convert the response encoding from Windows-1250 to UTF-8. Defaults to true. |
Delete File After Print (deleteFile ) |
Boolean flag indicating whether to delete the generated file after printing. Defaults to true. |
Output
- If
xmlOutput
is set totrue
, the node outputs the raw XML response from the Pohoda API in thejson.data
field. - Otherwise, the node outputs the print details in JSON format under
json
, and includes the generated PDF file as binary data underbinary.data
. The binary data contains:data
: The PDF file content.mimeType
:"application/pdf"
.fileExtension
:"pdf"
.fileName
: The original file name returned by the Pohoda API.
This allows downstream nodes to access the PDF directly for storage, emailing, or further processing.
Dependencies
- Requires an API key credential for authenticating with the Pohoda API.
- Uses HTTP POST requests to the Pohoda XML endpoint.
- Handles character encoding conversion from Windows-1250 to UTF-8 using the
iconv-lite
library. - Uses XML building and parsing libraries (
xmlbuilder2
) to generate and interpret requests and responses.
Troubleshooting
Common issues:
- Incorrect or missing
recordId
orreportId
may cause the API to return errors or no data. - Network or authentication failures if the API credentials are invalid or the base URL is incorrect.
- Encoding issues if
utfConvert
is disabled but the response contains Windows-1250 encoded characters. - File handling errors if the specified
fileName
path is invalid or inaccessible.
- Incorrect or missing
Error messages:
- Errors returned from the Pohoda API are surfaced with their message notes.
- If the response state is not "ok", the node throws an error with the provided note.
- If the print response does not contain expected data, the node may throw an error indicating missing print details.
Resolutions:
- Verify that the
recordId
andreportId
correspond to valid entries in Pohoda. - Ensure API credentials are correctly configured and have necessary permissions.
- Use the
xmlOutput
option to debug raw XML responses. - Check file system permissions and paths for saving or deleting files.
- Verify that the
Links and References
- Stormware Pohoda API Documentation (official API docs)
- iconv-lite npm package (for encoding conversions)
- xmlbuilder2 npm package (for XML manipulation)