SOLVED

SharePoint - MS Word Content Review Flow - Reality Check

Brass Contributor

I'm a documentation guy, experienced with Sharepoint, but a total Flow newbie.

 

I'm in a contract in the insurance space, in the KM group. I'm developing a documentation library, the aim of which is for drafting and review of Knowledge articles for ultimate publication in another system altogether. 

 

I don't want to enable Content Approval and Checkout because it's a small-team Drafting workshop with frequent minor edits, and constant check-outs and approval requests would be a major drag.

 

So I'm trying to work out a document review flow to send MS Word drafts to various expert users.  The first action is to send a link to a SharePoint document with a message for them to review, make comments, and save when done.  I have worked out how to do this part.

 

But I have this idea that I could create a Status flag for the documents so when a link has been sent out for review, the flow would automatically set the flag for that document to 'Under Review'. Then I could filter out the Under Review documents from the W-I-P documents, so the rest of the team are less likely to edit them while they're being reviewed, without literally checking them out.

 

Is that do-able? Make sense?

 

The other thing I'd like to do is capture the time:date sent in SharePoint in a Sent for Review field. Then there would then be an auto-calculated Due Back field (i.e. five working days after the Sent date), with an email reminder sent midway through day 3. 

 

So that's my workflow requirement in a nutshell. I've been looking through all the templates but none of them do exactly this, and many of them seem to assume Content Approval and Checkout, which I'm trying to avoid.

13 Replies
best response confirmed by Quotidian (Brass Contributor)
Solution

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. 
    clipboard_image_0.png

  • 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.
    clipboard_image_2.png

  • Initialize a string variable and set it to "FileId"
    clipboard_image_3.png

  • Add "Get files (properties only)" action. Point it to your site and document library. Add "Filter Query": ID eq variable from previous step.
    clipboard_image_4.png

  • 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".
    clipboard_image_5.png

  • 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.

clipboard_image_6.png

 

I hope this helps.

 

Norm

 

Hi Norm - absolutely great - I was trying to put something together but I never would have been able to come up with this. Thanks a million!

Hi @Quotidian,

 

Glad to help. If you run into any issues let me know.

 

Norm

I'm bound to, but I'm going to try and work through them first.

One issue FYI is that the SharePoint 'For Selected File' item doesn't appear for me, but 'for selected item' does, so I've used that.

I've also decided to prompt the user to enter a Due Back date manually, as figuring out 'business days' is just too hard!

I'm hoping to get to a finished state where the user (KM Manager) only has to click Send for Review, enter the email of the reviewer, and the Due Back date.

(Fortunately I have a Github account as the last contract I had, I built a doc site using Markdown on Github, but overall my coding skills are rudimentary.)

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:

 

FileID.jpg

 

The flow is throwing an error at this point:

 

Error400.jpg


I've been searching around for causes of error 400 but can't find anything specific.

I'm signing off for the night but will check back in tomorrow.

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

@Norman Young 

 

>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.

 

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. :smile:

@Quotidian glad to hear it! Are you good to go?

@Norman Young 

 

Yes indeed. There are other things I now need to learn to do, but this was an invaluable tutorial!

Hi Norm - one problem I'm now encountering is this:

"status": 400,
"message": "The expression \"ID eq\" is not valid.\

This is strange because when I first entered that string yesterday it seemed to fix the problem I was encountering. But this morning it's failing with that message.

Solved. After ID eq you have to put single quotes around the string. I am posting this here in case it's useful.

 

2019-09-13_10-18-16.jpg

Hi Quotidian, Norman,
I hope you can read my message here. Currently, I’m learning how to create a flow that allows me to initiate a review task for reviewers. The document needs to be reviewed is MS word and reviewers can edit the document directly in sharepoint/word. After they finish the review, a report should be generated with all reviewers’ comments.
In this review, initiator can set up periodic reminder to remind reviewers complete the task.
I would really appreciate if you can share your precious experiences related to this topic.
Honestly, I’m not an experienced sharepoint user. Your detailed instruction/response is helpful.
Many thanks
1 best response

Accepted Solutions
best response confirmed by Quotidian (Brass Contributor)
Solution

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. 
    clipboard_image_0.png

  • 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.
    clipboard_image_2.png

  • Initialize a string variable and set it to "FileId"
    clipboard_image_3.png

  • Add "Get files (properties only)" action. Point it to your site and document library. Add "Filter Query": ID eq variable from previous step.
    clipboard_image_4.png

  • 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".
    clipboard_image_5.png

  • 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.

clipboard_image_6.png

 

I hope this helps.

 

Norm

 

View solution in original post