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 various operations such as exporting data, creating entities, retrieving company info, and printing reports. For the "Pohyby" resource with the "Export" operation, it exports movement records (accounting movements/history) from Pohoda.
Typical use cases include:
- Exporting a range of accounting movement records for reporting or further processing.
- Filtering exported data by record ID or date ranges.
- Choosing output format as XML or parsed JSON.
- Converting character encoding from Windows-1250 to UTF-8 for compatibility.
Example: Export the last 100 accounting movements starting from a specific record ID, optionally receiving the raw XML response or a decoded JSON object.
Properties
Name | Meaning |
---|---|
Return Records Count (count ) |
Number of records to export, range from 1 to 10000. Defaults to 10. |
Start Record ID (idFrom ) |
Minimum record ID from which to start the export. Optional; if empty, starts from 0. |
XML Output (xmlOutput ) |
Boolean flag to return raw XML output instead of parsed JSON. Default is false. |
UTF8 Conversion (utfConvert ) |
Boolean flag to convert Windows-1250 encoded response to UTF-8. Default is true. |
Output
The node outputs an array of items corresponding to the exported records:
- If
XML Output
is enabled, each item contains ajson
field with a single propertydata
holding the raw XML string response. - Otherwise, the XML response is parsed into a JSON object representing the Pohoda response package.
- The main JSON output structure corresponds to the Pohoda API's responsePack and responsePackItem elements, containing the requested movement records.
- If the response includes printable documents (in other operations), binary PDF data may be included, but this does not apply to the export operation for "Pohyby".
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.
- Depends on external libraries for XML building/parsing and character encoding conversion.
- No additional environment variables are required beyond the configured Pohoda API credentials in n8n.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Requesting unsupported resources or operations will throw errors indicating "Not implemented".
- Incorrect filter parameters (e.g., invalid dates or IDs) may result in empty responses or API errors.
- Character encoding issues if UTF8 conversion is disabled but the downstream system expects UTF-8.
Error messages:
- Errors returned from Pohoda API are surfaced with their message notes.
- NodeApiError is thrown if the response state is not "ok", indicating API-level failure.
- Network or HTTP errors during request execution will also cause the node to fail unless "Continue On Fail" is enabled.
Resolution tips:
- Verify API credentials and permissions.
- Ensure filters and parameters conform to Pohoda API expectations.
- Enable UTF8 conversion unless you specifically need raw Windows-1250 encoded XML.
- Use the XML output option for debugging raw API responses.
Links and References
- Pohoda API documentation (official): https://www.stormware.cz/en/developers
- n8n HTTP Request node documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/
- XMLBuilder2 library used for XML parsing: https://github.com/oozcitak/xmlbuilder2
- iconv-lite for character encoding conversion: https://github.com/ashtuchkin/iconv-lite