Skip to main content

Notifications

Use Alerts and Sweep Rules to Trigger Flows Based on List Column Values...

I'm really happy to be back going with the Flow! I've been super busy prepping for the birth of my amazing baby girl who came into this world just a few weeks ago! I was unable to attend Ignite, but she's totally worth it! I am glad to be back making more content again.

 

Well, enough about me- let's go ahead and "trigger" the use case here, shall we?

 

As with any implementation, Flow is best utilized when the environments and services that it connects with are properly prepared for the implementation of a workflow, and when the business users that will rely on it have an easy and reliable method for completing their task- after all the goal of all of these tools and services in Office 365 is to make us all more productive and make everyone's lives easier in the long run, right?

 

For most of us in the IT is so hard to set aside time to plan and prepare properly for an implementation but always remember that you can save a heap of time in the long run by making the extra effort to take the time to do things properly now- in fact as I type this, it occurs to me that this is true with most things in life!

 

On that note, this post is a step by step how to for getting more out of Flow using other tools that exist in Office 365- in this case we'll be utilizing Outlook Inbox Sweep rules.

 

 

Why sweep rules you say?

 

Flow triggers for a list are understandably limited due to the nature of column metadata, and would be very resource intensive when it comes to all of those lists that have MASSIVE numbers of items (I've personally seen a SPO list with over 2 Million items) or when tons of changes are occurring frequently in the environment.

 

There is however a tool that is already part of the inherent SharePoint list structure- the old trusty, reliable List Alert. You can very easily set an alert to send an email to a user with every change that happens in the list, and then use the emails in question to trigger your Flows based on very specific criteria. Using Alerts in conjunction with Outlook sweep rules, you can start your workflow process with a super simple but powerful filter, to only trigger the Flows you need.

 

 

How does that help Flow interact with list metadata changes?

 

Flow can be triggered by new emails at

the folder level in Outlook, so if you setup your list columns and sweep rules properly, you can trigger Flow events for very specific changes on a list- and do all sorts of things based on data entry as well.

 

This could be specific for users, unique data fields, classifications- any of the values that are typically added as SharePoint list metadata. If you wanted, you could even use key phrases and allow users to enter in long text fields.

 

The only trick is understanding the format of the incoming emails from the Alerts on the SharePoint List... here, let me show you!

 

 

First, set up your SharePoint List and turn on alerts to be sent to an appropriate email box.

 

Go ahead and set up your columns, and for the column values, to make certain that there is a naming convention for reliably triggering the sweep rule, I strongly recommend a "Choice" column, where the value has a unique string of characters that won't be mistaken in other emails by the sweep rule. If the value is "Marketing" the sweep rule will act on every email with the word marketing for instance, but if you have a code system, this will reduce the chances of a false positive: -Marketing- or Marketing_ or, with a series of numbers for a code that fits a business case, like Marketing 334.

 

In my example, I'm creating a list for Video Requests.

Image 001.png

I've added columns to reflect information corresponding to the submitted requests- the "Type of Request" column is a choice column which give the values used by my sweep rules.

Image 002.png

Turning on the Alerts in the modern interface is suuuper easy:

Image 005.png

After you select alerts, just enter the name of the account email box you intend to use, and click "OK". For this use case, make sure that the alerts are set to "Send me and alert when: Anything changes"

Image 006.pngAs you can't yet use a shared email box or public folder for this purpose with Flow, you'll need to

have the alerts go to an inbox for a service account (could be the most basic license for Outlook/Office 365), or even your own account- whatever authenticating account email box will work for your business rules.

 

Then, prepare the folders where the sweep rules will sweep emails from the List Alerts.

 

You will need to set up the sweep rules based on the SharePoint List metadata column values alone. Though the title of the column in the alert email would be nice to include for a unique character string, the rule will not recognize it as the email itself is formatted into a table, so the text is not one unique string. See an example of an alert email below:

Image 008.png

Here, I've added a folder for each "Type of Request" to correspond with my Choice Column Value from the list.

Image 003.png

Once the folders are created, I can add my sweep rules by going to Settings->Mail->Inbox and Sweep Rules, and choosing to create a rule that includes the words in  the body.

Enter in the unique choice column value, and choose the action to move the email to the corresponding folder. You'll need one rule for each unique choice value.

 

Image 011.png

 

 

Image 012.png

You could go the extra mail and add multiple criteria to the sweep rule if desired, rather than trying to create a unique value as mentioned above, but this seems like more work to me if you are having to set up many folders and rules for your list.

 

Next, test the sweep rules by creating a few items in your list.

 

 Here, I'm adding an item with the choice value of "Communications 450"

 

Image 013.png

Now, based on my sweep rules, the email has been moved to the corresponding folder:

 

Image 014.png

Now, the most important part!! You can begin making your Flows which can now be triggered by very specific criteria based on the metadata values of the list via the inbox sweep rules! 

 

Begin by creating a Flow that is triggered by a new email going to one of your folders in question to match your business use case. Your flow will not be triggered until a new email comes into one of the folders in question!

foldersimg.png

Image 015.png

You can use this with as many Outlook folders as you want!!

 

You may take some time to study the other sweep rules in Outlook, and see if there are other notifications from applications and services in Office 365 or even from other non-Microsoft products that could trigger tasks in Outlook or Planner, or maybe even activities in Dynamics CRM. If you just need to send a notification, you don't even need to use Flow or modify your alerts, just modify a sweep rule to forward or send an email!

 

You could even setup data entry or other services for specific types of metadata received in a list as well- the sky truly is the limit.

 

The Sweep Rule + Flow combination is a super easy way to add a powerful layer of functionality to a workflow use case.

Comments

*This post is locked for comments

  • Use Alerts and Sweep Rules to Trigger Flows Based on List Column Values...

    Great trick, thank you

  • Eddierthomas Profile Picture Eddierthomas 44
    Posted at
    Use Alerts and Sweep Rules to Trigger Flows Based on List Column Values...

    This. Is. Ingenius!