You are viewing limited content. For full access, please sign in.

Question

Question

Needing ideas please for creation of a workflow for a daily email of changed documents

asked on November 24, 2016

Hi guys,

A customer is wanting to use their LF system as a type of job management system.  Each job has a number of documents and folders that are built up during the life of the job.  There are various Forms and Workflows as part of the job process, and at present the job owner is receiving an email notification whenever a new document is created for the job, a review process completes, a quote document is received, etc etc.  

A job owner can be responsible for multiple jobs, so as you can imagine, the email traffic is getting pretty heavy.  They want to change it so that the owner receives a single email each morning that contains a list of all the documents/folders that were created/modified the previous day.  (The top level folder for each Job is the "master" reference for the job with its template containing most of the job metadata - "Job Number" being the key/linking field in all templates - so the "Job Folder" template is one of the main templates.)

Based on some of the other suggestions made in here, I've added a (hidden to users) yes/no "Change" field to each of the main templates.  In Workflows that would normally send an email notification to the job owner, I'm replacing the Email activity with a field update to set the "Change" field on the document/folder to "Yes".  So now I have a bunch of documents/folders throughout the repository with the Change field set to "Yes".

I've got a new workflow (that'll run at the start of each day) to the stage where it searches the repository for all Change = "Yes" fields, then For Each Entry, retrieving the owner's email, the job number/name/customer/status, and the document/folder template and last modified date.  This is then being written to a row in a SQL table.

So far so good, I'm retrieving the data I need and it's all in SQL, but I'm a bit stuck on the next step, that of composing a single email per job owner that lists all the changed document/folder details for the jobs that belong to them.  Any suggestions on the best approach for this?

One other thing I'm wondering about, if they were using Web Access I could generate a URL for each of the documents, store it in SQL, and include that in the body of the email.  As they aren't using Web Access that's not an option, is there any way of attaching a link to each of the documents in the email that goes out?  I know how to do this normally, however the email creation will be outside of the For Each Entry step so I can't reference the relevant entry per owner in order to add it as an attachment in the email.

Here's the workflow so far (the first two activities remove the existing data in the SQL table in preparation for the current entries), any suggestions will be appreciated.

Thanks!

Mike

0 0

Replies

replied on November 25, 2016

Hi Mike

It is possible to do a search for documents that were modified that have changed each day by doing a scheduled search using a token searching for a Last modified on a given date. As this is a scheduled event looking for the previous days Last Modified date, The Date Token Calculator can create a Token for Todays Date less a day to Find Documents that changed Yesterday.

You can then build up a multi-valued Token of the days documents that were found and display them as a list in an email using the Index and Line Break Setting when adding the token to the email.

This will allow you to provide the functionality you are looking for without having to deal with having to use a Metadata fields that show the document has changed and also provides a fairly efficient workflow.

As you said you didn't have WebAccess I just put the file path in the token, but if you wanted to, you could generate the Web URL for each document and have the link instead.

I've attached the workflow file for this should you want to review, just change the extension from txt to wfx.

1 0
replied on November 27, 2016

Hi Steve,

Thanks very much for that, the date token is a good approach instead of the additional field setting.  It doesn't resolve the issue with separating out the changed documents to each Job Owner though, and that's where I'm stuck.  The aim is to be able to get one email per owner that just lists their jobs that have changed over the past day.

Thinking about it as I write this, your suggestion has given me an idea in that if I run a search first for all the owners in the repository, then in a subsequent For Each Entry section run a secondary search using the date token against the current entry, that might sort it.

I'll give that a go.

Thanks again,

Mike

0 0
replied on June 16, 2017

Mike, Did you ever get this sorted out the way you expected to using the Owner information?  I have a similar use case I'm trying to puzzle through right now regarding documents up for review by an owner.

 

Goal is to get one email per owner listing all the documents up for review  AND at the end provide a list of ALL the documents up for review to an administrator who manages our documentation library.  So my use case is similar and I'd love to know how you worked this out.

 

Appreciate any feedback/help on this you could provide.

0 0
replied on February 14, 2018

Michelle I'm sorry, for some reason I didn't get/see a notification of your post so completely missed this, I hope you were able to find the answer to your issue.

0 0
replied on February 15, 2018

Actually I did not get an answer to my use case yet, but in re-reading your last entry in November 16, how did what you were going to do provide you with the single email per owner? 

0 0
replied on February 15, 2018

Hi Michelle, I first created a list of the owners for all jobs currently in the system (I get lots of duplicates, but I strip them out later in a "For Each Owner" activity), then built on Steve's suggestion for using the date token and identifying all jobs that changed "yesterday" i.e. all changes within the past 24 hours as the workflow is scheduled to run before the start of each workday.  Within the For Each Owner activity I then search against the jobs from yesterday belonging to the owner to create a list of all the jobs in a single token, then use that token in my email.  Here's the workflow:

 

0 0
replied on February 16, 2018

Mike,  that is something I think will work in my use case.  Thanks so much for sharing.  I will be trying this out and let you know how it goes!

0 0
replied on February 18, 2018

No problem Michelle, all the best.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.