12
Dec
2018

Microsoft Recurrence Flow for Office 365

Huge organizations have many requirements for the automation of tasks in one or another way. It is always beneficial for an organization to have some automated tasks because it reduces manual efforts of people. Some organizations or users have requirements to send the notification, alerts, etc. on a timely basis from SharePoint Online. As one can’t deploy the custom coded solution in SharePoint Online, Microsoft is provisioning Microsoft Azure Web Job and Microsoft Flow to achieve these type of requirements.

Microsoft Azure Web Job runs a program or script in the background in the same context of the Web app, API app or Mobile app. To use Azure Web Job, the Azure subscription is must require. After this, multiple Web Jobs can be created and used. A web job can be scheduled to run in a timely manner (hourly, daily, etc.) or it can be triggered on a specific event like item update, file upload, etc.

Microsoft Flow is a tool which is cloud-based software and allows users to create automate flows across multiple applications and services. Automated workflows are called flows. Once a flow is built, it’s manageable on the desktop or through an app over the mobile device. Flow can be integrated with many Microsoft services. The Microsoft Flow Admin Center allows an administrator to manage permissions, roles and users, and many more features. Visit this page to have answers to some frequent questions related to Microsoft Flow.

Though Microsoft Azure Web Job is very efficient and reliable tool for such automated functionalities, it is cost effective too as it requires the Azure subscription.

On the other hand, Microsoft Flow provides a Recurrence trigger i.e. Microsoft Recurrence Flow. It is also called Microsoft Scheduled Flow. This trigger runs event/task at regular customized time intervals. Using this, one can achieve various event/task like sending newsletter email, sending notifications/alerts etc. on recurrent bases. This flow can be scheduled on required recurrent frequency i.e. daily, weekly, hourly, monthly etc. to perform a scheduled task. As Microsoft Flow already belongs to Microsoft Office 365 platform, it does not require any additional subscription.

Let’s dive more into this to see an example of MS Recurrence flow.

Create Microsoft Recurrence Flow

Let’s assume, there is a list of Daily task in an Office 365 site collection. Each task has an expiry date and assigned user as shown below.

List of Daily Task

Flow Requirement: Create a Microsoft Recurrence Flow which will run Daily and trigger an alert email to an assigned user 3 days before the expiry date. Walkthrough below steps to create this flow.

  1. From the app launcher icon of the Office 365 portal, click Flow. This will redirect to My Flows page.

    My Flows Page

  2.  

  3. Click + New > + Create from blank.

    Create New Flow

  4.  

  5. Click on Create from blank from below the screen.

    Create a Flow from Blank

  6.  

  7. From the Triggers panel, find and select Recurrence.

    Triggers panel

  8.  

  9. Set Values for recurrence, Interval = 1 and Frequency = Day.

    Set Values for recurrence

  10.  

  11. Click on + New Step.

    Click on New Step

  12.  

  13. From the action panel, find and select Get Items action.

    Action Panel

  14.  

  15. Set values, Site Address = Your site collection URL and List Name = Name of the list.

    Set Site Address & List Name

  16.  

  17. Click on + New step > From the action panel, find and select Apply to each.

    Select "Apply to each" From Action Panel

  18.  

  19. Select the “value” variable from the Dynamic content pane and then click Add an action inside the box.

    Select the value

  20.  

  21. From the action panel, find and select action Condition.

    Select Condition from Action Panel

  22.  

  23. Set values of this condition as below:
    1. Choose a value = Expiry DateChoose a value - Expiry Date
    2. Keep is equal to in middle dropdown
    3. Add an expression to calculate the difference between today and Expiry date in the right side Choose a value box.
    4. Expression = formatDateTime (addDays (utcnow(), 3), ‘yyyy-MM-dd’)Set Expression
    5. If Expiry date = Today’s date + 3 then this condition will satisfy and an alert email will be triggered to assigned user.
  24.  

  25. Inside If yes section, find and add an action “Send an email”

    Add an action - Send an email

  26.  

  27. Set email address, subject and body as per requirement.

    Set Email Address, Subject & Body

  28.  

  29. If there is a requirement to perform some action when the condition is False, then those actions can be performed inside If no section.
  30.  

  31. As shown in the earlier screenshot of the Daily Task list, an assigned user of a task which has an expiry date as “19/11/2018” will get alert email on “16/11/2016”.

    Task Expiration

 

Conclusion

The development of recurrence task can be easily accomplished in less time and in an effective way with Microsoft Flow compared to Microsoft Azure Web Job. Thus, an organization having Microsoft Office 365 subscription can achieve many automated tasks through Microsoft Flow’s various templates.

 

 



Comments

Leave a Reply

Your email address will not be published. Required fields are marked *