AgentBrains Document Structuring
Start document structuring tasks and retrieve task status/results from n8n.
AgentBrains Document Structuring
Use Document Structuring when a workflow needs AgentBrains to process a document link or storage reference and return a task ID that can be checked later. Document Structuring support is available in n8n-nodes-agent-brains version 3.3.0 or newer.
Document Structuring is asynchronous. Start Task returns a taskId; it does not block until processing is complete. The node does not poll automatically.
Operations
| Operation | Use it for | Required fields | Optional fields | Output |
|---|---|---|---|---|
| Start Task | Start a document structuring/preparsing task. | source | categoryId | { "taskId": "..." } |
| Get Task | Retrieve task status, progress, and result. | taskId | none | task status/progress/result |
Start Task
Select Document Structuring as the resource and Start Task as the operation.
Required field:
source: document URL/link or storage reference to process.
Optional field:
categoryId: category ID used to structure the document with a specific category policy.
If categoryId is omitted, AgentBrains processes the document through the general category flow.
Example request body:
{
"source": "https://example.com/document.pdf",
"categoryId": "category-id"
}Example request body without category:
{
"source": "https://example.com/document.pdf"
}Expected output:
{
"taskId": "task-id"
}Get Task
Select Document Structuring as the resource and Get Task as the operation.
Required field:
taskId: task ID returned by Start Task.
Expected output includes:
taskIdstateprogressresultapplicationStatus, when availableentityId, when available
This is a status/result lookup. Start Task does not wait for the final result.
Example: Start structuring and wait for the result
- Add the AgentBrains n8n node.
- Select Document Structuring as the resource.
- Select Start Task.
- Set
sourceto the document URL/link. - Optionally set
categoryId. - Store the returned
taskId. - Add a Wait, Schedule, Loop, or retry step.
- Add another AgentBrains node.
- Select Document Structuring → Get Task.
- Pass the returned
taskId. - Repeat until the task result is available.
Expected result: the workflow starts asynchronous document processing and later retrieves the status/result.
API mapping
| n8n operation | Public HTTP API |
|---|---|
| Start Task | POST /structuring/tasks |
| Get Task | GET /structuring/tasks/{taskId} |