cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to create a workflow that sends a dynamic email 1 month from a certain date?

Hi,  I am new to Nintex workflows and have created some basic ones.  I am trying something I think to be a little more complicated.

I would like to have a workflow send an email with dynamic content I create based on certain information as it pertains to a particular item in a list.

The workflow should work something like this. 

1. An item in a list has a status that is changed to check mailed or bill credited (done by user)

2a. When the status is check mailed the date this occurs is placed in the 'check mailed date' column (currently done by another workflow)

2b. When the status is bill credited the date this occurs is placed in the bill credit date' column (currently done by another workflow)

3. This workflow should now set a date that is (1) month from either 'check mailed date' or 'bill credit date' depending on what was selected.

4. On this new date (1 month in the future) the dynamic email is automatically sent to the email address in the 'email address' field.

I've thought about creating a new column called (emailSendDate) that gets populated with a date 1 month in the future from the check mailed date or bill credit date. This workflow would run each evening and send out emails for items that have that date on it. 

Any thoughts on the based way to go about this?

0 Kudos
Reply
4 Replies
Workflow Hero

Re: How to create a workflow that sends a dynamic email 1 month from a certain date?

check these search results on "site workflow reminder". they describe ideas how to approach these kind of requests

https://community.nintex.com/search.jspa?q=site%20workflow%20reminder 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to create a workflow that sends a dynamic email 1 month from a certain date?

Thanks for the direction Marian.

I have started at @cazza162 Cassy Freeman's great blog post https://community.nintex.com/community/build-your-own/blog/2016/05/23/site-workflow-document-review-...

Below is my attempt to replicate this for my use which is basically to send a link to a survey to a customer.  We only want to send it one time per 12 months to the customer's email address.  The customer may have additional items in the list over the course of 12 months, but once that first email is sent, we do not want another sent for 12 months from that date.

The basic flow for me is that the user changes an item's status to 'check mailed' and another field gets set with that date (check mailed date). 

  1. The calculate date block currently gets set with the current date and sets the variable (vfuturedate) to 1 month from the current date. I want it to look at the 'check sent date' field IF it has a value then set the vfuturedate to 1 month from that date.
  2. I would also like to prevent another notification from being sent for the 12 months to the email address set as a part of this workflow on this item.

Any thoughts on how to accomplish?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to create a workflow that sends a dynamic email 1 month from a certain date?

I'd proceed as follows:

  1. calculate date: calculate date 1 month ahead, store it as ISO8601 string to a text variable (eg. vfuturedateISO)
  2. calculate date: calculate date 12 months ago, store it as ISO8601 string to a text variable (eg. vYearAgoISO)
  3. query list: query list for all items where checkMailedDate == vfuturedateISO OR billCreditDate == vfuturedateISO
    return fields: ID, customerID/name, plus all the fields that are needed to make up notification body
    store result set for each field into a separate collection variable
  4. for each: iterate over collection of ID, save current ID to a variable (currID), save loop index into a variable (loopIdx)
  5. within the loop
    • collection operation: get current customer from collection of customer IDs/Names at current index position identified by loopIdx and save it to a variable (currCustomer)
    • query list: query the list for all items where CustomerField == currCustomer AND sendMailDate > vYearAgoISO
      return fields: ID
      store result set to a collection variable
    • collection operation: get number of elements (count) in collection of ID, save it to a variable (eg. nbrOfNotificationToCustomer) - if it contains at least one element you need not to send notification to the customer, since it already got one within recent 12 months
    • run if: check if nbrOfNotificationToCustomer) > 0
    • within the run if
      • collection operations: several collection operations to get values from collections returned in step 3 that are needed for notification
      • send notification: send notification to current customer
      • update sendMailDate to CurrentDate for an item identified by a currID
0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to create a workflow that sends a dynamic email 1 month from a certain date?

how you get on

0 Kudos
Accept as Solution Reply