Agent BrainsAgent Brains
n8n

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

OperationUse it forRequired fieldsOptional fieldsOutput
Start TaskStart a document structuring/preparsing task.sourcecategoryId{ "taskId": "..." }
Get TaskRetrieve task status, progress, and result.taskIdnonetask 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:

  • taskId
  • state
  • progress
  • result
  • applicationStatus, when available
  • entityId, 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

  1. Add the AgentBrains n8n node.
  2. Select Document Structuring as the resource.
  3. Select Start Task.
  4. Set source to the document URL/link.
  5. Optionally set categoryId.
  6. Store the returned taskId.
  7. Add a Wait, Schedule, Loop, or retry step.
  8. Add another AgentBrains node.
  9. Select Document Structuring → Get Task.
  10. Pass the returned taskId.
  11. Repeat until the task result is available.

Expected result: the workflow starts asynchronous document processing and later retrieves the status/result.

API mapping

n8n operationPublic HTTP API
Start TaskPOST /structuring/tasks
Get TaskGET /structuring/tasks/{taskId}

On this page