Replies: 1 comment 2 replies
-
|
Hi @Tonic867! I'm Dosu and I’m helping the docling team. You don't need to manually copy and paste the Task id in n8n. When you submit a document for conversion using the async API endpoint (like POST /v1/convert/file/async or /v1/convert/source/async), the response includes a JSON object with a field called task_id. You can extract this task_id programmatically in n8n and use it in your next HTTP Request node to fetch the result. Here's how you can set this up in n8n:
The error you saw ("resource you are requesting could not be found") happens because the placeholder {task_id} is not being replaced with the actual value—n8n needs to reference the output of the previous node, not a literal string. If you want to wait for the task to finish before fetching the result, you can add a loop or use the /v1/status/poll/{task_id} endpoint to check if the task is complete before making the GET request for the result. This approach is supported by the Docling-server API design: the async endpoints return the Task id in the response, and you can use that id to fetch the result once processing is done (source, source). To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I'm very new to this but learning quickly and just have a question with regards to GET results. I'm using n8n and below is a copy of my curl that I'm using. When converting a document via http://localhost:5001/ui/ a Task id is created.
When I execute the below I get "Problem in node ‘HTTP Request‘ The resource you are requesting could not be found" but if I copy and paste the Task id from the Docling GUI I get the result. What would be the correct expression used where you don't have to manually copy and paste the Task id?
curl -X 'GET'
'http://localhost:5001/v1/result/{task_id}'
-H 'accept: application/json'
-H 'X-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions