Skip to main content

Command Palette

Search for a command to run...

A Step-by-Step Guide to Using Document Output (Preview) in Microsoft Copilot Studio

Updated
4 min read
A

"Empowering businesses through Microsoft Power Platform and Dynamics 365 CE expertise. Consultant, Blogger, Innovator."

Microsoft Copilot Studio has introduced a powerful new capability — Document Output (preview) — that allows you to automatically generate polished Word documents using AI. Whether you're creating invoices, reports, contracts, or certificates, this feature lets you combine your own branded layout with dynamic AI-generated content.


What Is Document Output (Preview)?

Document Output (preview) is a feature in Copilot Studio that allows your prompt to return a .docx Word document instead of a plain text response.

You upload a Word layout template containing placeholders (like {{CustomerName}} or {{InvoiceNumber}}), and Copilot automatically fills those placeholders with content generated from your prompt.

Perfect for:

  • Invoices

  • Reports

  • Contracts

  • Customer summaries

  • Certificates

  • Automated documents in workflows


Step-by-Step Guide


Step 1 — Select “Document (preview)” as the Output Type

In Copilot Studio:

  1. Open your Prompt.

  2. Look for the Output dropdown in the top-right corner.

  3. Change the output type to Document (preview).


Step 2 — Open Document Settings

After enabling Document Output:

  • Click on Document settings (just left of the Output dropdown).

  • This panel is where you upload your Word layout and view all detected placeholders.


Step 3 — Create Your Word Layout Template

Open Microsoft Word and design the document exactly how you want it to look:

  • Add headers, footers, logos

  • Add tables, titles, and formatting

  • Leave blank areas where dynamic content will go

Wherever you want Copilot to insert data, add a placeholder using double curly braces:

Examples of simple placeholders

{{CustomerName}}
{{InvoiceNumber}}
{{InvoiceDate}}
{{TotalAmount}}

Examples in tables

{{items.description}}
{{items.quantity}}
{{items.unitPrice}}

Placeholder Rules

  • Must use {{PlaceholderName}}

  • No spaces → {{Customer Name}}

  • Use meaningful names

  • Tables require tableName.fieldName

Once finished, save your file as a .docx document.


Step 4 — Upload Your Template to Document Settings

Back in Copilot Studio:

  1. In Document settings, click Select to upload your Word template.

  2. Copilot will analyze the file and automatically detect all placeholders.

  3. The placeholders will appear as a list (e.g., CustomerName, InvoiceNumber, items.description).


Step 5 — Write Clear Prompt Instructions

Now write instructions telling Copilot how to fill each placeholder using the user’s input.

Example:

“You are generating a professional invoice. Use the provided text to fill each placeholder:

  • Map customer name to {{CustomerName}}

  • Map invoice number to {{InvoiceNumber}}

  • Extract all products/services and fill the items table

  • Calculate subtotal and total amount”

Tip:
The clearer the instructions, the better the document quality.


Step 6 — Test With Sample Input

Click Test Prompt and enter sample data.

Example Input

Invoice Number: INV-2025-001
Customer: Adatum Technologies
Date: 2025-07-24
Items:
 - Laptop Pro X – Qty: 2 – Unit Price: $1099
 - Keyboard Ultra – Qty: 1 – Unit Price: $199
Address: 145 Greenfield Avenue, Springfield

Copilot will:

  • Extract the information

  • Interpret your instructions

  • Fill your layout

  • Show a preview of the generated document

  • Provide a download link

Step 7 — Use the Document in an Automated Flow (Power Automate)

The real power comes when you automate document creation.

Example Use Case: Generate an Invoice From an Email

  1. Create a Cloud Flow in Power Automate.

  2. Trigger: Manually trigger a flow

  3. Add action: Run a prompt → select your Document Output prompt.

  4. Pass the String as input to the prompt.

  5. Add action: Create file (OneDrive, SharePoint, etc.)

  6. Use Document Output Content Bytes as file content.


Limitations to Know

  • Only Word (.docx) is supported

  • You must upload a layout — Copilot cannot create one from scratch

  • Formatting is controlled by Word, not your prompt

  • Layout file size limit: Max 20 MB

  • Some regions may not have access yet

  • Preview feature → may change over time


Benefits of Using Document Output

  • Professional branding every time

  • Zero manual editing

  • Reliable structure thanks to your layout

  • Automated workflows with Power Automate

  • Better chatbot experience (users receive ready-made documents)

  • Perfect for business processes, from HR to sales to finan

133 views

More from this blog

A

AqeelKhalidBlog

12 posts

Passionate Power Platform Consultant sharing blogs on insights, best practices, and innovative solutions to empower businesses and professionals in the evolving Microsoft ecosystem.