Flow #1 – Send a Weekly Email Reminder

Featured

Tags

,


As promised, today I will provide the first step-by-step Flow.  I must confess, this is so easy, it’s almost embarrassing – but the point is to show how Microsoft is democratizing technology.  And I love it!

Requirements:

  • Create an automated email workflow
  • Send weekly, on the same day and time each week
  • Send to multiple email addresses

Assumptions:

  • You have have access to O365 including Flow and Outlook
  • You have never created a Flow before

Steps:

  1. Access Flow
    • There are two ways to do this:
      • 1 – Login to o365 account and select the Apps icon in the upper left, then select the Flow app
      • 2 – Type flow.microsoft.com in a browserAccess 1
  2.  Create a New Flow
    • Click on the “Create from blank” link to start from scratch
    • Give your Flow a Title
  3. Begin building the Flow
    • Search for “Recurrence”
    • Select the “Schedule Recurrence” serviceCreate FlowRecurrence
    • Click to “Show Advanced Options”
    • Set Frequency to “Day”
    • Set Interval to 7 (so it will send weekly on the same day)
    • Set Time Zone
    • Set Start Time
      • Note: the start time must be in the this format example below:
      • 2017-05-02T12:00:00Z  (This is today’s date, but you will need to set it to start on the day and time of the week you want it to send every week.)  Frequecncy
    • Select “New Step” > “Add an Action”
    • Select “Office 365 Outlook” from the services
      • Note: you may have to authenticate your email if this is your first FlowCreate FlowSelect o365 Email
    • You will see several options, select “Send an Email”
    • Fill out the details of the email, but selecting “Show advanced options”
    • You will see a box where you can add Dynamic Content, but since we are not working with other applications like SharePoint, etc. – there will be no options for Dynamic Content – just close the box. No dynamic content
  4. Now that you have created the reminder email, click Create Flow to saveFill out email
  5. Next Test the flow:
    • Go back to your Flow by clicking on My Flows
    • Open and edit
    • Change the frequency to “minute”
    • Change the time and day to today, with the time within 2 minutes of the current time
    • Change the interval to “2” (2 minutes from now)
    • Save by clicking Create Flow again
    • Change the email To line to include your email (so you can get the test)
    • Update Flow
  6. Wait to receive the email
  7. Evaluate email, make changes to the body
    • You can also select to make the email HTML for more formatting options
    • Based on the test interval, you should receive this same email every two minutes until you change the logic back to reflect the actual time, day  and frequency you prefer. success
  8. Success!  As you can see from the time stamps in the email list, the email is sending every two minutes.

 

 

 

 

 

Microsoft Flow – I am in love!

Tags

, , , ,


So – I have been a big SharePoint and SharePoint Designer fan for many years.  But, as I have moved into project management roles where I am no longer provided access to use SharePoint Designer (SPD) in the enterprise, I have had to get creative in order to be able to continue to use SharePoint on a daily basis.

Luckily Microsoft has launched Flow, which is available with O365 (depending on the license you / your company may have).  I LOVE it!  But like SharePoint, I also kind of hate it right now too.

Let’s start with the love part.  🙂

Ok – so I have recently been able to create several processes for my department using SP and Flow together.  I was a pretty early adopter of Flow, so I had some trouble in the beginning with the capabilities for more complex logic.  After a couple of months I had to reach out to our portal and collaboration team to get them to consider building my workflow in SPD.  However, I revisited Flow again last week and found that MSFT had increased the capabilities to create Switch Cases.  (Truth is, I have no idea what a Switch Case is….but it works for logic where you have many IF, Then conditions and actions.)

There isn’t much out there on the web right now about how to create workflows with Flow, so I plan to create a 5 part article on this – with one new step-by-step example per week.  Stay tuned!

To check out Flow, visit this link.

Create a SharePoint Designer Workflow Based on Two Sets of Calculated Results

Tags

, , ,


Today I will create a workflow which sends an email to two different mailboxes based on two sets of results.   

This is based on the requirements below from reader Suzie:

“Hi,

I have been asked to create a workflow that runs based on 2 sets of results within a list.

1.If a user answers YES to any 4 out of 6 questions in the list, an email is sent to mailbox A
2.If a user answers YES to 2 or less of the 6 questions, an email is sent to mailbox B

The question columns are all Yes/No check boxes. Is this possible and if so, how would I do this.

Thanks,

Suzie”


Step #1 – Create a Custom SharePoint list 

  • I am going to assume the user knows how to create a custom SharePoint list
  • I am creating this example using SP 2013 and SPD 2010 Workflow
  1. Create a list  – for this example I used “Example Custom List”
  2. Create 6 Questions, each as a Yes/No column type
  3. Leave the title question 

Step #2 – Create a SharePoint Designer Workflow 

  • I am using SPD 2013 but have selected to create a SPD 2010 workflow
  1. Navigate to the site in SPD
  2. Select Workflows
  3. Create a new List Workflow – and select the “Example Custom List”
  4. Give it a name – for this example I used “Email A and Email B”
  5. Click the name of the workflow and in Start Options check the box to Start workflow when an item is created
  6. Click Edit workflow

 

Step #3 – Create the logic for the Workflow

  1. Rename the first Step to “Calculate Columns”
  2. Select Local Variables at top ribbon
  3. Then create 6 different Local Variables
  4. Name them “Calculate 1”, “Calculate 2”, “Calculate 3”, “Calculate 4”, “Calculate 5”, “Calculate 6”
  5. Make sure each one is a Number type of variable
  6. Create the logic:Select this entire group and copy
    1. Select Condition at top ribbon
    2. Select Any value equals current value
    3. Select value Question 1 equals value Variable Calculate 1
    4. Set Action at top ribbon
    5. Select Set workflow variable
    6. Select variable Calculate 1 to 1
    7. Select Else-If branch
    8. Select Set workflow variable 
    9. Select variable Calculate 1 to 0 (zero)
  7. Then paste down the page 5 times
  8. Change each value to the next Question # and Calculate # (Question 2, Calculate 2….)
  9. Insert a new Step and rename it “Calculate Total”
  10. Select Action at top ribbon
  11. Select Do Calculation
  12. Select the first “value” in the statement and click the fx next to the blank space
  13. Change the Data Source in the dialog window to Workflow variables and parameters
  14. Change the Field from source to “Calculate 1”
  15. Select the second “value” in the statement and click the fx next to the blank space
  16. Change the Data Source in the dialog window to Workflow variables and parameters
  17. Change the Field from source to “Calculate 2
  18. Rename the variable outcome to “Q1+Q2”
  19. Repeat #11-19 two more times but add variables “Calculate 3” + “Calculate 4”; and “Calculate 5 + Calculate 6”
  20. Select Do Calculation again – but now add the variable outcomes for the above like this:
    • “Q1 +Q2″ plus Q3 + Q4” (Output to variable renamed to “Q1+Q2+Q3+Q4”)
  21. Select Do Calculation again – but now add this
    • “Q1+Q2+Q3+Q4″ plus”Q5+Q6” (Output to variable renamed to “Total Yes”)

So the above seems a bit convoluted, but in essence what I have done is create local variables that say for example, IF Question 1 = Yes, the saved variable “Calculate 1” = 1; IF Question 1 = No, the saved variable “Calculate 1” = 0 (zero).  This was repeated for all six questions using Else if branches.  Then I created a second step to add all the variables.  Unfortunately, I didn’t see a way to calculate more than two values at a time, so I had to add the variables for Q1 and Q2 (which are “Calculate 1” + “Calculate 2”), etc. Then I had to add those sums up for a total.   Now when the user answers the questions, the workflow will run and put a 1 value for each Yes answer.  The variables will be added up for a total.  The totla number of Yes answers will be used to determine which mailbox should be emailed.

Your logic should look just like this screen shot:

 

Step #4 – Create the Emails

  1.  Add a new Step to the Workflow and rename it “Send Email A or Email B”
    1. Create the logic for Email A:
    2. Select Condition at top ribbon
    3. Select If any value equals value
    4. Select the first value link
    5. Select the fx next to the blank space
    6. Change the Data Source in the dialog window to Workflow variables and parameters
    7. Change the Field from source to the variable “Total Yes”
    8. Change the operator to “is greater than or equal to”
    9. Change the second value to 4
    10. Select Action at top ribbon
    11. Select Send an Email 
    12. Click these users link
    13. Select who to send the email to, create a subject line and a body
  2. Create the logic for Email B:
    1. Select Else if branch at top ribbon
    2. Select If any value equals value
    3. Select the first value link
    4. Select the fx next to the blank space
    5. Change the Data Source in the dialog window to Workflow variables and parameters
    6. Change the Field from source to the variable “Total Yes”
    7. Change the operator to “is less than or equal to”
    8. Change the second value to 2
    9. Select Action at top ribbon
    10. Select Send an Email 
    11. Repeat Steps to format the email to line, subject line and body
  3. End the workflow:
    1. Select Else if branch at top ribbon
    2. Select Action at top ribbon
    3. Select Stop workflow 
    4. In the log message link add a message that explains why the workflow didn’t send an email (IE: user selected 3 Yes questions)

 

Step #5 – Test the workflow

  1. Go the custom list named Example Custom List
  2. Add a new item, answer 5 questions as Yes
  3. Add a new item, answer 2 questions as Yes
  4. Add a new item, answer 3 questions as Yes

Results should be:

  1. Email is sent to Email A for the 5 Yes answers
  2. Email is sent to Email B for the 5 Yes answers
  3. Email is not sent to any mailbox for the 3 Yes answers

See all screen shots here:

Create local variables Define a lookup Create emails logic Create Calculate Columns logic Create add total logic Create a List Workflow Copy and paste one section of logic Add a workflow Variables dialog boxExample Custom List

Step By Step Workflow to Notify Document Author of Document Expiration Date

Tags

, ,


This post will address a request from reader Moses.  Here is the request:

“Hi Rebecca can you give dummies step by step guide on how to add a workflow please? Basically i am trying to send an email notification to the author of a policy document 30 days before the policy expiry date. I already have these fields in the list as mandatory fields..“Expiry date” and “Author” (which is username from Active Directory)I will really appreciate if you can help me on this… with a step by step approach on what i do on Sharepoint Designer 2010 and how i active this work flow to work? I have looked at various website, but they go into more complex workflows.. i just want something simple as that explained in a very very basic way as i am very new to Sharepoint and Designer.

Kindest Regards

Moses”

Based on the request above, here are the requirements for the workflow:
  1. Create email notification to send to Author of Document
  2. Send email 30 days before Expiration Date
  3. Author and Expiration date are columns in SharePoint
  4. Use SharePoint Designer 2010

Here are the steps.  I am actually in SPD 2013, but will create a SPD 2010 workflow.  So the screen shots may appear a little bit different – but should function the same.

1) In SP 2010 document library, create a new Calculated Column to determine what the date will be 30 days prior to Expiration Date.  I am calling this column “30 Days Prior”.
  1. Navigate to SharePoint Document Library
  2. Library Settings > Create Column > Calculated Column
  3. Name the Column > In Formula put this text    =[Expiration Date]-30    
  4. Make sure the formula is =[Select Your Column Name for Expiry Date] – 30
  5. Select Date Only type > Save

Calculated Column

2)  Upload a new document to the SP Library and check to make sure the “30 Days Prior” Calculated Column is functioning correctly.

30 Days Prior

 

3) Open SharePoint Designer
  1. Click Open Site
  2. In the dialog box add the url of your site (without the document library portion), just to the root – something like this: https://yoursharepointportal/sites/sitename/ in the Site Name field and then click Open
  3. Once the page opens, click on Workflows on the left side navigation
  4. On the top menu bar select List Workflow (this is how you will associate the worflow to the correct list or library)
  5. Select the correct library name > a dialog will open, Name the Workflow
  6. Then the Text Designer opens with the area to create the Workflow Logic – it will open with Step 1 already in place
  7. I called my Workflow  – “30 Days Notice”
  8. You can rename the Steps by clicking on them (optional)

     

4) Create the Workflow Logic

  1. Where is says “Start typing or use the Insert Group on the Ribbon” is where I begin adding the logic.
  2. Select from top menu Conditions > select “If any value equals value”
  3. Click the first hyperlink “value”, then the fx button, a dialog opens
  4. Next in the dialog, change the Data Source from “Current Item” to “Workflow Context”
  5. Then change the Field From Source to “Association: Start on item Creation”
  6. Then select the second blue hyperlink “value” to “Yes”

Add Condition    Workflow Context

This tells the workflow to run if the Start Option check box “Start workflow automatically when an item is created” is checked.  This is found by click on the name of the workflow. Make sure to Save when asked. Then check the box “Start workflow automatically when an item is created”.  To get back to the workflow logic, click Edit Workflow link on the left box under Customization.

Edit WF

5) Continue building the workflow logic
  1. Point the cursor in the next space where it says “Start typing or use….”
  2. Type the word “Wait” then hit Enter
  3. You get a list of Actions to select from > select “Wait for Field Change in Current Item” (this allows you to select from your SP columns already created)
  4. Then click the first hyperlink “field” and a list of your columns in the document library should appear > Select the Calculated Column I created called “30 Days Prior”
  5. Now click the second hyperlink “value” and the first box with the “…” to open the date dialog >the Date dialog defaults to Current Date selected, hit OK
  6. Now the statement should read: “Wait for 30 Days Prior to equal Today”
  7. Point your cursor in the next space available where it says “Start typing or use….”
  8. Type the word “Email” and hit enter > the statement will now say “Email these users”
  9. Click the hyperlink “these users” > Define Email Message Dialog will open

   wait for change Email dialog

6) Create Email message
  1. On the To: line of the Email message, click the Address Book icon on the right
  2. Select “Workflow Lookup for a User” > Add > Another dialog box opens
  3. In the Lookup for Person or Group dialog > Leave it on “Current Item” for the Data Source ; Select “Author” for the Field from Source ; and “Display Name” for the Return field as > OK >OK
  4. Now create the email subject by clicking the box with “…”  You can add text here, as well as fields from your SP library, such as the title of the docuement
  5. Now create the email body.  To add a field in the body of the text, click the button on the bottom “Add or Change Lookup” – for this example I added the “Title”.
  6. Then I added the Expiration Date in the body.
  7. To add the document item URL > click on the Link icon > Type the name in the Text to Display field> click the “…” box for the Address > in the String Builder dialog, click the Add or Change Look-up button on the bottom
  8. In the Lookup for String dialog box use “Workflow Context” for the Data Source; select “Current Item URL” for the Field from Source box
  9. Save and Publish the workflow

To line Current Item URL  Lookup for Person or Group Add date field

7) Test the workflow
  1. To test the workflow, change the the Action “Wait for 30 Days Prior to equal {and change the date from “Today” to a specific date and time (like 5 minutes from now).}
  2. Make sure that your Start Options on the Workflow main page is set to “Start workflow automatically when items is created.
  3. Save and Publish again.
  4. Once you confirm it works, edit the workflow back to equal “Today” in the Wait for 30 Days Prior to equal line.
  5. Save and Publish again.

SharePoint List with Workflow Email Reminder Set to Send 30 Days from Created Date

Tags

, ,


Today I’m going to create a SharePoint 2010 list that has a workflow set to send an email notification.  Below are the requirements:

  • Create list in SharePoint 2010 to track a time driven process
  • Create Workflow using SharePoint Designer to send an email reminder when an item is exactly 30 days from the Created date
  1. First I created a Custom List in SP2010
  2. In the Custom List I created a Calculated Column.
  3. In the Calculated Column (which I named Reminder Date) I used a formula pulling from the Created (date) column. I used the following formula to populate the Reminder Date field based on the Created date field.  =Created+30                                                                   

Click to see Calculated Column screen shot

4. In workflow settings in SPD2010 I checked the box: Start workflow automatically when item is created

5. Then I created a Workflow to send the email reminder 30 days after the Created date using the following logic:

  • Condition: If  any value equals value 
    • For the first value select the fx and then for data source field select Workflow Context
    • Then for field from source select the Association: Item Start on Creation

Click to see Workflow Context

Workflow Context

  • Action: Pause until Date  (Current item: Reminder Date field)
  • Condition: If current item field  (Current item: Reminder Date) equals (is greater than or equals) value (Today) 
  • Action: Email  (To: User who created item)
  • Action: Then log (reminder email sent) to the workflow history list 

Click to see the example workflow

WF

6. Then I checked the workflow for errors, saved it and published it