Our client needed to generate contracts for service providers who are located around the world. Each country requires specific legal language and contracts for non-English speaking providers need to be created in English and their native language.
We created country-specific Word templates that include the required legal language and content control fields which are placeholders for where Flow will insert the data. These templates are kept in a SharePoint library that uses metadata columns to identify the template’s country and language.
We built a Power App that prompts the user to select a service provider and type of contract they need generated. The Power App then searches the library’s metadata columns to determine if a template exists. When an appropriate template is found the Power App navigates to a screen whose OnVisible property contains a call to a Power Automate Flow. The call to the Flow passes in the current user’s ID, effective and expiration dates of the contract, service provider’s ID, and template’s country and language.
The Flow gets provider info from a SharePoint list and the appropriate contract template from a SharePoint library, assigns values to the template’s content control fields, then saves the contract to a “pending contracts” SharePoint library.
Type: Power Apps, Power Automate, SharePoint
Date: 2023