This is a known issue with the Document Output (preview) feature in Copilot Studio's prompt builder. Here are the main causes and fixes based on official Microsoft documentation:
1. Placeholder format is wrong in the Word template
All fields to replace must be wrapped in double curly brackets {{ }}. If any field has incorrect formatting, you'll get the placeholder replacement error. For table fields, the format must be {{tablename.columnname}} — and placeholder names cannot contain spaces. Microsoft Learn
Open your Word template and double-check every placeholder follows this exact syntax.
2. Template over 5MB — save and reopen before testing
When you upload a document layout larger than 5MB, you need to save and reopen the prompt before testing. Without this step, the prompt won't work correctly on subsequent tests. Microsoft Learn
This likely explains the "works first time, breaks later" behavior you're seeing.
3. Template is not re-uploaded after moving environments
When moving a prompt from one environment to another using Solutions, the Word template is not moved with the prompt — you need to re-upload it manually in the prompt output settings of the target environment. Microsoft Learn
4. Workaround if saving still fails — use Power Automate
Several community members confirmed that when the native prompt save is unreliable, the most stable approach is to use the AI Builder "Run a prompt" action inside a Power Automate flow, passing inputs and capturing the Document Output Content (Bytes) as output. This bypasses the in-studio save issue entirely and is also the recommended production pattern.
Since this is still a preview feature, it's worth submitting feedback via the 👎 button in the Studio UI or opening a support ticket — Microsoft is actively tracking issues in this area.
Hope this helps!
Paolo
✅ Did this solve your issue? → Accept as Solution
👍 Partially helpful? → Click "Yes" on "Was this reply helpful?" or drop a Like!
Want more tips on Power Platform & AI? Follow me here:
🔗 LinkedIn: https://www.linkedin.com/in/paoloasnaghi/
▶️ YouTube: https://www.youtube.com/@BeyondThePlatforms
📸 Instagram: https://www.instagram.com/beyond_the_platforms/
🌐 Website: https://www.beyondtheplatforms.com/