Showing results for 
Search instead for 
Did you mean: 

Build a proposal document dynamically using SharePoint and Flow

This guide details how to build a Microsoft Flow solution which dynamically creates a Microsoft Word document based user-selected options entered within a SharePoint list and is based on this simple scenario:

A SharePoint list is used to capture product proposal requests, and upon posting a request a proposal document should be automatically created containing product information related to the products selected within the request.

Configure SharePoint

This solution uses four separate SharePoint lists details below:

  • SharePoint Library: Products - Word Documents
  • SharePoint List: Proposals
  • SharePoint List: Products
  • SharePoint Library: <Selected Destination Library>

SharePoint Library: Products - Word Documents

This SharePoint library is used to store a document for each specific product, no additional metadata has been added to the library.


SharePoint List: Products

The products list contains a list of all the products. Each product should have a corresponding entry within the 'Products - Word Documents' library and named exactly the same excluding the file extension, for example:

  • Products - Word Documents Entry: 'Flow Connector.docx'
  • Products Entry: 'Flow Connector'

NOTE: As you build this flow you might think you don't need the 'Products' list and that the 'Products - Word Documents' library could be used in isolation... you'd be correct! However, the degree of separation will make it a lot easier to scale and add additional capability in future so we recommend separating.


SharePoint List: Proposals

This SharePoint list is used to capture the proposal requests and is configured as follows:


A single Lookup column named 'Products' associated with the 'Products' list has been added with the following configuration:


Upon data entry it should look as follows:


Building the Flow

1. Create a new Flow using the 'Automated -- from blank' option


2. Enter a name for the Flow, select the 'When an item is created' SharePoint trigger action, click 'Create'


3. Configure the 'When an item is created' SharePoint trigger action

3.a. Site Address: Enter the location of the SharePoint site where the configured lists are held.

3.b. List Name: Select the 'Proposals' list


4. Add a 'Initialize variable' action

4.a. (Optional): Rename the action to 'Word Documents for Merging'


4.b. Name: Set to 'ProposalDocuments'

4.c. Type: Set to 'Array'


5. Add an 'Apply to each' control action

5.a. Select an output from previous steps: Select the 'Products' property from the 'When an item is created' SharePoint trigger action.


5. Inside the 'Apply to each' action; Add a 'Get file content using path' SharePoint action

5.a. Site Address: Enter the location of the SharePoint site where the configured lists are held.

5.b. File Path: Manually select any file from the 'Products - Word Documents' library


5.c. File Path: Select the filename omitting the extension and then select the 'Products Value' property from the 'When an item is created' SharePoint trigger action


5.d. File Path: The final configured value should appear as follows


6. Add an 'Append to array variable' action

6.a. Name: Select the previously created 'ProposalDocuments' variable


6.c. Value: Copy and paste the following value into the 'Value' field

"fileName": "@{items('Apply_to_each')?['Value']}.docx",
"fileContent": "@{body('Get_file_content_using_path')?['$content']}"


NOTE: If you have renamed either the trigger action or the 'Apply to each' action you will need to modify the copied value to reference the updated action names

7. Underneath the 'Apply to each' action; Add a 'Merge Word Documents' Encodian action

7.a. Filename: Set the name the proposal document which will be created. For this example, we have used the 'Title' property from the 'When an item is created' SharePoint trigger action concatenated with '.docx'.


7.b. Click the 'Switch to input entire array icon'


7.c. Remove any existing text within the 'Documents' field


7.d. Documents: Select the 'ProposalDocuments' variable


8. Add a 'Create file' SharePoint action

8.a. Site Address: Set to the value of the SharePoint site which contains the target document library

8.b. Folder Path: Set to the value of the target SharePoint folder


8.c. File Name: Select the 'Filename' property from the 'Merge Word Documents' Encodian action


8.d. File Content: Select the 'File Content' property from the 'Merge Word Documents' Encodian action


9. The completed flow should follow this construct:


10. Now lets test the flow!


11. Select 'I'll perform the trigger action', click 'Save & Test'


12. Go to SharePoint and add a new entry into the 'Proposals' list


13. Verify the Flow has executed successfully


14. ... the merged document containing the correct documents has been created.




This post should provide you with a good base solution which you can build upon to create further complex solutions which dynamically generate documents based on user defined input.

Thanks for reading!

About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: and twitter I also write at, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -