Forum Discussion
SharePoint - MS Word Content Review Flow - Reality Check
- Sep 11, 2019
Hi Quotidian,
This is possible using Flow. High-level steps include:
- Add "Status" (Choice), "Sent For Review" (Date and time), "Due Back" (Date) and Flow (String) columns to the Document Library.
- Create a new Flow using the SharePoint "For a selected file" trigger. Point it to your site and document library. "Add an input" for Email.
- Initialize a string variable and set it to "FileId"
- Add "Get files (properties only)" action. Point it to your site and document library. Add "Filter Query": ID eq variable from previous step.
- Add "Update file properties" action. Point it to your site and document library. Set "Status Value". Set "Sent For Review" to expression utcNow('yyyy-MM-dd'). Set "Due Back" to expression addDays(utcnow('yyyy-MM-dd'), 5) - you'll have to figure out the business days requirement.
- Add "Send an email" action. Set "To" to "Email" from "For a selected file".
- Format the "Flow" column in the document library using this JSON code - https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/generic-start-flow. Make sure you get the Flow ID correct.
At the end of it you get a button within the document library that will trigger the Flow and direct the email to the reviewer.
I hope this helps.
Norm
- Add "Status" (Choice), "Sent For Review" (Date and time), "Due Back" (Date) and Flow (String) columns to the Document Library.
I've made great progress and even managed to format the JSON field such that it kicks off the flow. But I've hit a blocker, which I think has to do with the File ID.
I'm assuming the File ID is the numerical ID that is auto-generated by SharePoint. This is the field that I am wanting to reference with the following variable:
The flow is throwing an error at this point:
I've been searching around for causes of error 400 but can't find anything specific.
You're not seeing the FileId because you need the "For a selected file" trigger. I believe you get that option when you create a new Flow with the "Instant" option.
More to follow tomorrow.
Norm
- QuotidianSep 12, 2019Brass Contributor
>I believe you get that option when you create a new Flow with the "Instant" option.
So you do! There's a trap for new players. Trying again.
- QuotidianSep 12, 2019Brass Contributor
Got it working. I had omitted the characters 'ID eq' in the Filter Query which was causing it to fail but it is now running.
- Norman YoungSep 12, 2019MVP
Quotidian glad to hear it! Are you good to go?