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

Question

Question

Workflow to send automatic email and attach document

asked on August 14, 2017

Good morning,

I have been working with a workflow that will send an email notification when a document will expire in 30 days. In the past, I have used this same workflow to send an automatic email with a link to the the relevant folder. However, when I go to attach a document rather than a folder, the workflow does not work. I have tried it multiple times and re-written the workflow with no luck. For the "attach" section, I have selected document and have left that as is and have also tried as a pdf or as a zip file with no luck. Any ideas what the problem could be?

 

 

0 0

Replies

replied on August 14, 2017

What exactly doesn't work? Did you look in the instance details for any errors?

0 0
replied on August 14, 2017

It will not send the email. There are also no errors or warnings listed in the instances. It looks to me like if the field I am looking to pull information from is applied to a document, rather than a folder, it will not work.

0 0
replied on August 14, 2017

Does the search find any documents? (there should be a message on the Messages tab in the instance details with the number of search results).

0 0
replied on August 14, 2017

No, it never finds anything if it is a field assigned to just the document.

0 0
replied on August 14, 2017

Can you post screenshots of both your search activity and of the attachment settings in the email?

0 0
replied on August 14, 2017

0 0
replied on August 14, 2017

0 0
replied on August 14, 2017

I think Jennifer meant a screenshot of the search criteria in Search repository and the Messages tab so we can see if the search found anything. Your screenshots above show the search still running, so we can't tell what's going on. 

0 0
replied on August 14, 2017

0 0
replied on August 14, 2017

0 0
replied on August 14, 2017

How is your date token calculator set up?  A quick glance of your search query looks good so I would like to narrow down possibilities.  Can you put the track tokens activity right after the date calculator to verify what date is being produced when it runs?

0 0
replied on August 14, 2017

0 0
replied on August 14, 2017

Silly question, but if you run the same search in the Client (or Web Access), does it return any documents?

0 0
replied on August 14, 2017 Show version history

This might sound like a silly question but have you verified that there are actually documents in your repository that have the current date in the field you are searching?

From what I have read in the chain it does not sound like your workflow is actually broken but rather it finds no results in the search so the for each loop doesn't actually run (hence no email).

0 0
replied on August 14, 2017

Hi,

Yes I have set several files to the correct date for testing.

0 0
replied on August 14, 2017

How is the Policy Review Date field set up?  Text or Date?  MM/DD/YYYY or DD/MM/YYYY?

Your token is returning MM/DD/YYYY but I noticed that on your shot of the workflow showing no results found the date/time of the activity shows as DD/MM/YYYY.  Just want to check and make sure that the date token value is matching the format of the actual field value.

date.jpg
date.jpg (11.3 KB)
0 0
replied on August 14, 2017

The field is set up as DD/MM/YYYY as in the picture above. 

0 0
replied on August 14, 2017

I should mention that as a test, I moved this document to a folder and set today's day on that folder as the policy review date. I changed the setting to attach the folder rather than the document and it worked immediately.

0 0
replied on August 14, 2017

Have you tried changing the search query to specify looking for documents?

0 0
replied on August 14, 2017

You have me very curious now!  I have recreated exactly what you have and it works fine.

What version of Workflow are you on?  Have you left the document in the folder but leave the date on the document instead of folder?

0 0
replied on August 15, 2017

Hmmmm. I'm not sure how I would change the search query. I am relatively new to workflow. We are on version 9 of workflow. Yes, I have tried having the date just on the document and not the folder. It is baffling me!

0 0
replied on August 15, 2017

One hint that I was given a long time ago was to build your search in client then copy it over to workflow.  If you go into Client and set up your search with the field, Name, and Search Syntax, it will build the search for you and all you have to do is copy it.  Use the Field Search to select the field and put in a date (this can be changed once in workflow), Use Name and put the * wild character in the field with Document checked.  Press the Search button and it will populate the Search Syntax field for you .  Then just copy and paste.

Once you paste it into workflow, replace the >= with = to look for just one date, and replace the date with your search token.

DateSearch.jpg
DateSearch.jpg (78.09 KB)
0 0
replied on August 15, 2017

Have you check both workflow and workflow admin console to verify the most recent version of the workflow is running?  Maybe Workflow Subscriber service needs to be restarted?

Do a search in workflow designer on the workflow by name to get a listing of all the times it ran.  Look at the workflow version that is running (might have to add the column).  Then go into workflow admin console and look at workflow definitions under Workflows and make sure the version number of the most recent test runs matches what admin says is the most recent version.

WorkflowVersions.jpg
0 0
replied on August 17, 2017

The numbers match and I am still not getting any results with the new search formula.

0 0
replied on August 17, 2017

Have you tried the search with a hard-coded date just to rule out the possibility of the problem lying with the token?

0 0
replied on August 17, 2017

Yes, I have put the date in as well to try.

0 0
replied on August 14, 2017 Show version history

It will not send the email. There are also no errors or warnings listed in the instances. It looks to me like if the field I am looking to pull information from is applied to a document, rather than a folder, it will not work.

You are not allowed to follow up in this post.

Sign in to reply to this post.