Managing contracts manually can be slow, inconsistent, and error-prone. Extracting key terms, parties, and dates by hand not only wastes time but can also lead to compliance issues and missed obligations.
With Encodian’s ‘AI – Process Contract‘ action in Microsoft Power Automate, you can automatically extract essential contract details, such as parties, dates, and jurisdiction, and return them as structured JSON data for downstream automation.
In this tutorial, we’ll show you how to build a Power Automate flow that:
This automation helps organisations accelerate document processing, improve accuracy, and make contracts searchable, reportable, and auditable directly within Microsoft 365.

1.a. Flow name: Provide a name for your flow
1.b. Trigger: Select the SharePoint ‘When a file is created (properties only)‘ trigger action
1.c. Click ‘Create‘.

2.a. Site Address: Select the name of the site where you have previously created the document library ‘Contracts’.
2.b. Library Name: Select the library ‘Contracts’.

We now need to configure the flow to retrieve the contract document content from the SharePoint ‘Contracts’ library
3.a. Rename the action to ‘Get file content – Contract’
3.b. Site Address: Select the name of the site where you have previously created the document library ‘Contracts’.
3.c. File Identifier: Select the ‘Identifier’ property provided by the ‘When a file is created (properties only)‘ action.

Now we need to add the Encodian action to process the contract document with AI:
4.a. File Content: Select the ‘File Content’ output from the ‘Get file content – Contract’ action.
4.b. Remove New Lines: Select ‘No’.

The processed contract is returned as a JSON dataset in the “Result” variable of the outputs of the ‘AI – Process Contract‘Â action.

The following image shows the schema of the payload when it is extracted in a JSON editor.

Next we will parse the JSON output so that it can be used in subsequent actions.
4.a. Content: Select the ‘Result’ output from the ‘AI – Process Contract’ action.
4.b. Schema: Enter the JSON schema shown in the following MS Word document ‘ParseJSONSchema‘
(Note: if using a different contract file than the ones provided, a sample schema can be generated by executing the flow, extracting the JSON output from the ‘AI – Process Contract’ action, and using the ‘Use sample payload to generate schema’ option of the ‘Parse JSON’ action.)

Finally, we will update the properties in the SharePoint ‘Contracts’ document library with the data extracted from the contract document.
5.a. Site Address: Select the name of the site where you have previously created the document library ‘Contracts’.
5.b. Library Name: Select ‘Contracts’.
5.c. Id: Select the ‘ID’ property from the outputs of the ‘When a file is created (properties only)’ action.
5.d. Advanced Parameters: Select ‘Show all’.
We will use a combination of inline ‘If’ and ‘Empty’ function(s) around the property values to handle any empty or null values that may have been returned.

Upload the sample contract documents to the ‘Contracts’ document library. Await the execution of the Flow, then view the updated properties in the ‘Contracts’ document library.
Before:

After:

Once you’ve automated contract processing, you can extend this flow further in so many ways. Check out these examples:
Q: Can Power Automate extract data from contracts automatically?
Yes. With Encodian Flowr’s ‘AI – Process Contract‘ action, you can extract structured data such as parties, execution dates and durations directly from uploaded documents.
Q: What formats are supported?
The ‘AI – Process Contract‘ action supports the following input file types:
Q: Can I customise the extracted files?
Yes. The AI model returns standard fields, but you can modify your downstream Power Automate flow to parse, transform, and store the data as needed.
Q: Is this secure for sensitive legal documents?
Yes. All processing occurs within Microsoft Power Automate using Encodian’s secure Azure-based infrastructure. Your data never leaves Microsoft’s PaaS environment.
If your organisation requires all data to remain completely within your Microsoft 365 tenant, we recommend exploring Encodian Dedicated Subscription options, which provide isolated processing within your own Azure environment.
For full details about this action, review the ‘AI – Process Contract’ action documentation →
We hope this post provides a helpful guide to process contract documents using Power Automate and the Encodian Flowr connectors.
Start your free 30-day trial for Encodian Flowr and begin automating contract intelligence today.
For further assistance, visit our support portal or raise a ticket with our support team.
Please share any feedback or comments – all are welcome.
Search 200+ Actions to see how Flowr can save you time
Sign up for your free 30-day trial; no cards, catches, or contracts.
CEO