Get Started
This tutorial shows a practical n8n workflow for asynchronous parsing with Anesya.
The goal is to:
- Create a parsing
- Poll it until completion
- Use the parsing output in the next step
This pattern works well for users who do not want to write code and need a reliable visual workflow.
The safest n8n flow is:
Manual TriggerorWebhookHTTP Request- Create parsingWaitHTTP Request- Retrieve parsingIf- Parsing final?- Loop back to
Waitif not final If- Parsing success or partial success?- Next business step
This is the easiest version in n8n because it uses JSON only.
Node type: HTTP Request
Recommended settings:
- Method:
POST - URL:
https://api.anesya.app/v0/parsing - Authentication: none
- Send headers: yes
- Header
X-API-Key: your API key - Send body: JSON
Body:
{
"document": "={{$json.document_url}}",
"model": "PIGALLE",
"picture_description_enabled": false,
"table_verification_enabled": false,
"metadata": {
"source": "n8n"
}
}The previous node must provide document_url.
If an earlier step already uploaded the file to Anesya or you already have a document ID, use this payload instead:
{
"document": "={{$json.document_id}}",
"model": "PIGALLE"
}This is usually simpler than sending the file content again.
If n8n already has the document as binary data:
- use
POST https://api.anesya.app/v0/parsing - switch the request body to
multipart/form-data - add a form-data field named
document - map that field to the binary property that contains your file
Add these extra form fields if needed:
modelpicture_description_enabledtable_verification_enabled
Use this only when you really need file upload from n8n. For many workflows, using a public URL or a stored document ID is simpler.
After the first request, save the returned parsing ID.
Node type: HTTP Request
Recommended settings:
- Method:
GET - URL:
=https://api.anesya.app/v0/parsing/{{$json.id}} - Header
X-API-Key: your API key
This node returns the current parsing state.
Important fields:
statuspages_successpages_failederror
Add an If node after Retrieve parsing.
Suggested conditions:
- If
statusisIN_QUEUEorIN_PROGRESS: go back toWait - If
statusisFINISHED: continue to the next step - If
statusisPARTIAL_FINISHED: continue only if partial data is acceptable - If
statusisERROR: go to an error branch
This branch is important. Do not treat PARTIAL_FINISHED as a generic error unless your use case requires all pages.
A practical default is a Wait node of about 3 seconds between polling attempts.
You can increase it if your workflows are large or if you want fewer polling calls.
Once the parsing is finished, common next actions are:
- create an extract
- store the parsing ID for later use
- review markdown or OCR output
- continue with another HTTP call
- branch on parsing quality before extraction
These mistakes are common in visual workflows:
- expecting the first
POSTcall to return the final result - polling without a
Waitnode - not branching on
ERROR - ignoring
PARTIAL_FINISHED - sending the wrong binary property in multipart mode