Quick overview
This workflow provides a single n8n form that routes to five LDXhub services (StructFlow, RefineLoop, RenderOCR, CastDoc, and ExtractDoc) to run one-off document processing jobs and return the generated output file directly to the user.
How it works
- Receives a submission from an n8n Form that collects an LDXhub API key, API host, and the target service.
- Routes the request to the selected service and fetches available models or engines from the LDXhub gateway using an HTTP request.
- Collects the remaining service-specific inputs via follow-up forms (for example model/engine selection, prompts/options, file upload, output format, and OCR language where applicable).
- Filters the available output formats based on the uploaded file’s extension for the conversion-style services.
- Submits the job to LDXhub (StructFlow, RefineLoop, RenderOCR, CastDoc, or ExtractDoc) and polls until the result is ready.
- Returns the processed file as a direct download in the form completion step, or shows an error page if the job fails.
Setup
- Create an LDXhub API key in the LDXhub portal and add an LDXhub API credential in n8n for the LDXhub node.
- Confirm the LDXhub gateway base URL (default https://gw.ldxhub.io) is reachable from your n8n instance, or update the host value used in the form.
- Ensure users have the correct input files available for the chosen service (JSONL for StructFlow, XLIFF for RefineLoop, and supported document/image types for RenderOCR, CastDoc, and ExtractDoc).