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, enabling users to export various types of financial and business data from Pohoda via its API. It supports exporting records such as invoices, bank transactions, accountancy journals, receipts, orders, stock information, and more. The node is useful for automating data retrieval from Pohoda for reporting, synchronization with other systems, or archival purposes.
Typical use cases include:
- Exporting a batch of invoices or receipts within a specified date range.
- Retrieving address book entries or stock lists for integration with CRM or inventory management.
- Fetching accounting journal entries for financial analysis.
- Exporting filtered data sets based on custom criteria like company name or document ID.
The node can output data either as parsed JSON objects or as raw XML strings, optionally converting character encoding from Windows-1250 to UTF-8.
Properties
Name | Meaning |
---|---|
Return Records Count (count ) |
Number of records to return in one export request. Range: 1 to 10000. Default is 10. |
Start Record ID (idFrom ) |
Minimum record ID from which to start the export. Used to paginate or filter records. |
XML Output (xmlOutput ) |
Boolean flag to output raw XML response instead of parsed JSON. |
UTF8 Conversion (utfConvert ) |
Boolean flag to convert Windows-1250 encoded response to UTF-8 encoding. Defaults to true. |
Additional relevant properties (not requested but used internally):
operation
: Fixed to "export" for this context.resource
: Specifies the type of data to export, e.g., invoices, bank transactions, address book, etc.filter
: Collection of filters to narrow down exported data, such as date ranges, company name, IDs, etc.entityDetailType
: For invoice exports, specifies the invoice type (issued, received, advance, etc.).
Output
The node outputs an array of items where each item contains:
- json: Parsed JSON object representing the exported data record(s) from Pohoda. The structure depends on the resource type requested.
- If
xmlOutput
is enabled, the output will contain the raw XML string underjson.data
. - In some cases (e.g., print operation), binary PDF data may be returned with metadata including MIME type and filename.
The JSON structure corresponds to the Pohoda API response converted into JavaScript objects, typically nested according to the specific resource schema.
Dependencies
- Requires valid credentials for Pohoda API access, including base URL, username, and password.
- Uses HTTP POST requests with Basic Authentication to communicate with Pohoda's XML API endpoint.
- Utilizes external libraries for XML building and parsing, and for character encoding conversion (Windows-1250 to UTF-8).
- No additional environment variables are required beyond the configured API credentials.
Troubleshooting
- Authentication errors: Ensure that the provided API credentials (username and password) are correct and have sufficient permissions.
- Invalid resource or operation: Selecting unsupported resources or operations will throw errors indicating "Not implemented for [resource]".
- Encoding issues: If the output contains garbled characters, verify the
UTF8 Conversion
setting; disabling it returns raw Windows-1250 encoded data. - API errors: The node throws errors if the Pohoda API response state is not "ok", including detailed messages from the API.
- Large data exports: When exporting large datasets, consider adjusting the
Return Records Count
and usingStart Record ID
for pagination to avoid timeouts or memory issues. - Filter format: Date filters must be ISO date strings without time components; invalid formats may cause empty results or errors.
Links and References
- Pohoda API documentation (official): https://www.stormware.cz/en/developers/api
- n8n HTTP Request Node documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/
- iconv-lite library (for encoding conversions): https://github.com/ashtuchkin/iconv-lite
- xmlbuilder2 library (for XML parsing and building): https://oozcitak.github.io/xmlbuilder2/