top of page

Using AI Hub: Document outputs in prompts

There is a new kid on the block and it's this amazing feature that I've been waiting for. And honestly it's good, really good. I think of many scenarios in HR that would benefit from this feature, and also many other areas where document generation is a day to day task.


In the latest documentation - that you can find as a reference at the end of this article - Microsoft team elaborates on what does it do:

The output of the 'Document (preview)' feature lets you generate a Microsoft Word document for your prompt response instead of text. The generated document follows a layout that needs to be provided in the document output settings.


Prompts up until now had two different outcomes: text or json, and while these are good document output puts everything in a different level. It's relevant for many purposes, today I will:

  • Walk you through the setup

  • Show you how to test it

  • See the outcome

By the end of this article you will be able to judge for yourself how good it is.



You will need to go to AI Hub in Power Automate or Power Apps, it's the same as all stuff stored there - prompts, models, etc - and can be used in either of the end products: apps or automations.



I went into Power Automate - you may need to go to make.preview.powerautomate, instead of the regular studio.



ree


Once you are in, go to AI Hub and then select Prompts.



ree


From the top select Build your own prompt.



ree


When creating the prompt, in the output section select Document (preview).



ree


And then select Document settings.



ree


Document/word template will display a drag and drop box where you can add your Word file. At this point is relevant that you:

  • Add all placeholders between brackets: this will help the prompt identify in your input what belongs where.

  • Use a Word file!!! PDF doesn't work, the outcome will be an editable document, as it may content errors but also require manual approval as it's a generative AI feature.



ree


Below is the example of the template I used for my reference letters, note the brackets for the placeholders, but also have a look at emojis, these are supported. Useless? Yes, but still supported :)



ree


Once you upload the file, it takes a short time to identify the placeholders. You can see them under the Document settings tab as shown below.



ree


One thing that is important, as everything in this AI new world, is to have a proper prompt, not sure if mine is that neurosurgeon precise but it does the job.


ree


To make the case real, I created an app that tracks HR Employee Masterdata, super simple nothing too fancy and with some questionable UI choices. Welcome screen has only two containers with Employee Master and Admin Settings.


ree

When selecting the Employee Master a new screen opens and it contains a Gallery with all the employee records. It's based on a SharePoint list, am I proud? No. Some of my friends won't like my decision, but let me promise you I'll come back with a better data source - this was just a test run.


In the Employee Master all worker records are stored, these will be used later on in the document generator via the custom prompt.


ree



Let's see what happens when I update a record in my Employee Master Power App and how the process flows (ignore the on-select UX disgrace, I'm focusing on functionality).



Flow run quite fast:


ree


And I received an email with the reference letter:



ree


Let's see the newly created file:


ree



My take on Generate 'Document (preview)' output for a prompt (preview)


PROS

CONS

Finally, AI can generate proper Word documents, not just text or JSON.

Requires careful setup of prompts and placeholders.

Super useful for HR and other document-heavy daily tasks.

Only works with Word files; PDFs are not supported (yet).

Supports placeholders and emojis, making templates flexible.

Documents need manual review before sharing, so not fully automated.

Fast and smooth in Power Apps / Power Automate, easy to test and use.

Minor UX issues in the output document.




ree


In case you'd like to dive deeper into the official Microsoft Resources, check these links:


 
 
 
© Ana Ines Urrutia de Souza 2025
  • Instagram
  • linkedin
  • X
  • Youtube
bottom of page