assemble_per_record

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Assembly MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-assembly -- dnx GroupDocs.Assembly.Mcp --yes
Folders, licensing and more →

assemble_per_record is a mail merge: it fills the same template once for every element of a JSON array and saves each result as its own file, named by a record field (fileNameField) or a running number. A bad record is listed, the rest are still written. Example prompt: “Write a welcome letter for every customer in customers.json, as PDFs named after the customer.”

Tool description (as the AI agent sees it):

Generates one document per record — a mail merge: a letter per customer, a certificate per attendee, an invoice per order — by filling the same template once for every element of a JSON array, and saves each result as its own file. Use it when the user wants separate documents for each row or record; use assemble_document for one document that lists all records. Templates: DOCX, DOC, RTF, ODT, TXT, Markdown, HTML, XLSX, PPTX, MSG, EML and more. Data: ‘dataJson’ (inline) or ‘data’ (a .json file) holding an array of objects, or an object with the array under ‘recordsPath’ (found automatically when the object has exactly one array). Each record is the template’s data for one document: its keys are the names the template uses («[Name]»), or name the record with ‘dataSourceName’ («[customer.Name]» → ‘customer’; worked out from the template when omitted). Files are named ‘