On this page

Getting started with DocLab

DocLab helps you turn Word, Excel, and fillable PDF templates into finished business documents. Start with a sample, prepare your own template, inspect its fields, then provide the information to fill them.

Contact Cloudwell for access and information about using DocLab with your own documents. Contact our team to request access. Contact sales for pricing and additional information.

Choose how to work

  • Try a sample: Visit Document Lab to explore five fixed sample templates without signing in or providing an API key. Public demos use sample templates, not your uploaded files.
  • Use your own documents: In an appropriately configured private workspace, sign in with your organization and connect an authorized API key.
  • Automate a workflow: Developers can use the HTTP API. A custom connector for Power Apps and Power Automate is in private preview and is not yet Microsoft-certified.

Prepare your template

Use a DOCX, XLSX, or fillable PDF file. Choose clear, stable field names so they are easy to map to your data.

  • Word: Use supported named content controls, tags, or aliases. Put repeating details, such as line items, inside a repeating section.
  • Excel: Use workbook or sheet-scoped defined names, or direct references such as Sheet1!A1. Repeating rows use a Section_ range and Items_-prefixed member names.
  • PDF: Use AcroForm text fields. Other field types may be detected but cannot currently be filled.

Templates must be no larger than 10 MiB. Avoid macros, embedded objects, and linked external resources. Test your template with representative data before using it in a business process.

Inspect the fields

Inspect your template before filling it. Inspection leaves the original file unchanged and reports each detected field’s name, type, location, parent group, and whether it is supported.

  1. Choose the template and its actual file format.
  2. Run inspection using your configured workspace or integration.
  3. Review unsupported fields and resolve them in the template.
  4. Use the returned field names and parent groups when mapping your data.

Repeated appearances of a name can be multiple occurrences of the same replacement. Inspection does not decide which fields your business requires.

Generate a document

  1. Start with the original template.
  2. Map your information to the field names returned by inspection.
  3. Supply values using the matching field type, such as text, number, boolean, or date. Text is not automatically converted to a number.
  4. Choose the output format and missing-field behavior.
  5. Generate the document, review warnings, and check the finished file.

Supported Word operations include text, checkboxes, repeating sections, formatting, PNG/JPEG images, safe HTML, and DOCX document insertion. Excel supports typed cell values, formatting, and supported repeating ranges. PDF filling currently supports AcroForm text values only.

Repeating information

Use repeating sections for invoice lines, proposal items, and other lists of records. Each row contains its own named, typed values.

  • Word: Use a repeating section with named controls inside it. An empty row list clears that section.
  • Excel: Use a Section_Items range with Items_-prefixed member names. The processor copies the prototype rows and their formulas/styles. Nested or overlapping Excel sections are not supported.

Excel calculation may take place when the workbook opens; DocLab does not provide a complete server-side Excel calculation engine.

Output and missing information

Keep the output format the same as your input for native Word, Excel, or PDF output. Word and Excel can also produce PDF when the deployment has an enabled, available renderer. PDF-to-Office and cross-Office conversion are not supported.

  • Preserve: Leave unmatched fields unchanged. This is the default.
  • Error: Stop generation when required replacements are missing.
  • Remove: Remove matching Word controls or clear matching Excel cells. This behavior is not supported for missing PDF fields.

PDF flattening, signing, XFA forms, and filling non-text PDF fields are not currently supported.

Download, preview, and privacy

Binary delivery returns a file for download. JSON delivery returns base64 file content, filename, content type, counts, and warnings. Asking for inline display does not guarantee that a browser can preview an Office file.

Expiring preview links are available only when enabled by the API operator. Native Office preview requires explicit opt-in because Microsoft’s online viewer receives the generated document. Use a binary download for private content. Treat preview links as confidential access links until they expire.

Converting an existing Word or Excel file to PDF does not fill fields and requires the same configured renderer as PDF output during generation.

Connect an application or flow

Use authenticated REST requests to connect DocLab to your own application or workflow. JSON and multipart file-upload routes are available.

The private-preview Power Platform custom connector can support Power Apps and Power Automate workflows. It is not Microsoft-certified. Contact Cloudwell for access and deployment-specific setup. Other systems, including CRM and line-of-business applications, require an integration using the API rather than a promised built-in connector.

API quick start

Use the API origin supplied by Cloudwell or your deployment operator. Send either X-Api-Key or an API-audience bearer token. Inspection requires documents.read; generation and conversion require documents.generate. Do not send both credentials as a fallback strategy.

TaskEndpoint
Check enabled capabilitiesGET /api/v1/capabilities
Inspect a templatePOST /api/v1/templates/inspect
Generate a documentPOST /api/v1/documents/generate
Convert Word or Excel to PDFPOST /api/v1/documents/convert

Each POST route also has an -upload multipart alternative. Connector generation uses POST /api/v1/connector/generate. Ask your operator for the full OpenAPI contract; the interactive API workbench is available only in Development.

Example generation request; replace the placeholder with base64 file content and use a field returned by inspection:

{
  "template": {"contentBase64": "<base64 file bytes>", "format": "Docx"},
  "options": {
    "outputFormat": "Docx",
    "delivery": "Binary",
    "fileName": "generated-document",
    "missingFields": "Preserve",
    "fields": [{"name": "CustomerName", "kind": "Text", "text": "Example customer"}]
  }
}

Store credentials securely. Do not put API keys or bearer tokens in shared scripts, source control, screenshots, or support requests.

Troubleshooting

  • Fields do not fill: Check the field’s spelling, parent group, supported status, and value type against inspection.
  • PDF output fails: Confirm the renderer is enabled and available. Not every deployment supports conversion.
  • Authentication fails: Check the key or token, target API, tenant, and read/generate permissions.
  • A PDF looks unchanged: Try a compatible viewer; PDF fields request viewer-generated appearances.
  • A file is rejected: Check its actual format, size, and unsupported features. Template limit is 10 MiB; generated output and conversion input are bounded to 25 MiB.

Common responses include 400 (input), 401/403 (access), 413 (size), 422 (unsupported operation), 429 (rate or concurrency), and 503/504 (renderer unavailable or timeout). Review returned warnings and include the trace ID when contacting support. Never send credentials or confidential document content.

Get help

Contact Cloudwell for access, template suitability, integration planning, or troubleshooting. Tell us the format, operation, and error code or trace ID. Contact sales for access, pricing, and additional information.

PRODUCT DEMO

See Cloudwell products in action

Choose a time to explore our Microsoft 365 apps and discuss your team’s needs.

LET’S TALK

Let’s talk about your next project

Choose a time to discuss your goals, explore your options, and find a practical next step.