Add a Document Schema to a Document Processing Node of Workflows

Document schemas define the structure and fields of data to be extracted from documents in agentic flows.

You can generate a document schema from a sample document, publish it for reuse, and associate it with a document processor node. When the workflow runs, the node uses the selected LLM and schema to extract structured information from documents and return the extracted data in the format defined by the schema.

Create a Document Schema

  1. Go to AI Agent Studio and open the Resources tab.
  2. Select the Document Schema subtab.
  3. Select Add.
  4. Enter a name and description for the document schema. The code is automatically populated based on the name.
  5. In Generate Schema From File, select Choose File and upload a supported sample document. See What file types, limits, and processing capabilities are supported in AI Agent Studio?
  6. Select Generate Schema.
  7. Review the generated schema definition.
  8. Publish the document schema, or save and close it to publish later.

Published schemas appear in the Document Schema subtab and can be reused across workflows. If you save and close a document schema, a draft copy appears in the Document Schema subtab. You can open the draft, make changes, and publish it. You can also open a published document schema, go to the draft, update it, and republish the schema.

Associate a Document Schema to a Document Processor Node

  1. From the Workflows tab, edit a workflow and add a document processor node to it.
  2. Enter a name and description for the document processor. The code is automatically populated based on the name.
  3. Select an error handler node to define failure handling.
  4. Select a product family and a product.
  5. Select the business object that provides the functions and parameters for the node.
  6. Select the function to run on the selected business object.
  7. In the Data Extraction section, set Use LLM for data extraction to Yes.
  8. Use the default LLM configured for the workflow or select another model.
  9. From the Schema Template list, select a published document schema.
  10. Publish the workflow.

When the workflow runs, the document processor uses the selected schema and LLM to extract information from the document. The extracted data is returned in the format defined by the schema, so workflow nodes, applications, or agents can process it more easily.