Xoralia Power Automate Flow Functionality
The following information describes the process of up-versioning a document stored in a SharePoint document library synced with Xoralia using PowerAutomate.
1. Installation requirements
The detail assumes that a Power Automate workflow has been deployed to the tenant environment by Content Formula. Due to limitations with Power Automate, the workflow requires that:
- Each SharePoint site must have its own 'Drafts' library, and its own 'Send for Review' and 'Send for Approval' Power Automate workflow deployed by ContentFormula.
- Each Document Library (in a given Site) synced with Xoralia must have its own 'Copy to drafts' Power Automate workflow deployed by ContentFormula.
- Each SharePoint site must have its own 'Drafts' document library.
For a given SharePoint site e.g. https://cfcloud.sharepoint.com/sites/OOTB_Accelerate there must be:
- A document library containing word documents of policies that are synced with Xoralia e.g. Accelerate - HR policies - All Documents (sharepoint.com)
- A document library called 'Drafts' – it is in this folder that the revised document will undergo editing, and a review and approval stage.
Furthermore anyone responsible for carrying out this workload must be a member of an Azure Active Directory (AAD) group called 'Document Approvers'.
For this tutorial, we will assume that the 'Annual Leave Policy.docx' policy is to be upgraded from version '1' to '2'
3.1 Copy to Drafts
Click the 'Copy to drafts' button for the relevant document – a panel should then show up on the right hand side of the browser window.
Then click the 'Run flow' button.
The user will then receive an e-mail notification if the document was successfully copied to the 'Drafts' document Library.
3.2 Send for review
At this stage of the workflow, the editor will make changes to the document ready for the members of the 'Document Approvers' group to comment on.
Once the revised document has been finalised, the document is expected to be sent 'for review' – this can be thought of an informal review process prior to sending the document for approval, where members of the group can leave comments on the document.
It is important that the 'Document Version' column metadata is not left blank, otherwise the flow will fail.
Click the 'Send for review button for the relevant document – a panel should then show up on the right hand side of the browser window.
Then click the 'Run flow' button.
The members of the 'Document Reviewers' group should then receive an email reminding them to review the document
3.2 Send for approval
At this stage of the workflow, the editor will send the document for 'Approval' to the members of the 'Document Approvers' AAD group.
Once this approval process has successfully been completed, the document can/will be deleted from the 'Drafts' document library and will replace the existing document in the document library it originated from.
It is important that the 'Document Version' column metadata is not left blank, otherwise the flow will fail. This is a parameter that can be set up as part of the flow but it is on necessary.
Once done, the user is expected to click the 'Send for approval' button for the relevant document – a panel should then show up on the right hand side of the browser window.
The editor must manually specify the document library for which the document is to be copied into / override the original document. This is to ensure the document can be sent back to its original document library automatically once the approval process is complete.
User to then click the 'Run flow' button.
The members of the 'Document Reviewers' group then receive an email with an adaptive card as per below, giving them the choice to either 'Approve' or 'Reject' the document, and leave comments if appropriate.
Each person in the group must approve the document for it to override the original in the specified Document Library. It could also be specified only the first user has to approval the document.
If the document is approved, the editor then receives an e-mail informing them if the document has been approved along with each approver's comments:
The document in the original document library will be then overridden with the newly approved document (if parameter is set), and the draft version in the 'Drafts' document library will be deleted: