cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DeckardREP
Level: Powered On

Trigger email if sharepoint list item does not exist

HI,

 

I've currently got a flow updating a simple sharepoint list from my inbox.

 

I get multiple jobs finished emails from automated systems, most of these arrive beteween 00:00 and 01:00 monday morning.

 

The initial flow looks at my inbox and creates a line item in my sharepoint list that the specific job has finished ("title", "received", "from"), (this sharepoint list is blanked at 23:59 Sunday night).

 

What I've been trying to do is create a second flow to send me an email when one of the expected line items in that sharepoint list is not present at1:05 on monday morning.

 

I've been trying various things (creating a reference sharepoint list that contains all the line items that I would expect in my updated sharepoint list and doing a compare = couldn't get this work as filtering on title, when it doesn't exist simply returns an empty array).

 

Any help would be gratefully received!

 

G

 

 

5 REPLIES 5
Super User
Super User

Re: Trigger email if sharepoint list item does not exist

Hi

A possible approach is to have a daily recurrency trigger at the desired time, get all items from the list and filter them. The goal of the filter is to search the item where it is declared that the specific job has finished ("title", "received", "from").

 

In order to combine REcurrence Trigger, SP Get Items and Filter Array, there is an excellent example published in the Official Flow Blog:

https://flow.microsoft.com/en-us/blog/email-digest-date-manipulations/

 

Once filtered, I would recommend to evaluate the length of the array output with a Condition. If result is zero, it means there is not item matching the conditions of the filter

Hope this helps





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





DeckardREP
Level: Powered On

Re: Trigger email if sharepoint list item does not exist

many thanks for your reply.

 

we have tried doing something similar using View (list of items), but have repeatedly failed in being able to create a condition which correctly identifies that an element doesn't exist because the array can be empty. 

 

How can we evaluate the length of the array output with a condition that returns true/false If result is zero?

 

many thanks in advance

 

G

 

 

 

 

Super User
Super User

Re: Trigger email if sharepoint list item does not exist

Hi

Let's assume your array is the output of a Filter Array action Block (with its default name given by Flow editor)

In such a case you can try with the following expression:

 

@equals(length(body('Filter_array'),0)

 

Hope this helps





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





DeckardREP
Level: Powered On

Re: Trigger email if sharepoint list item does not exist

Yes it did! many thanks :-)

Community Support Team
Community Support Team

Re: Trigger email if sharepoint list item does not exist

Hi @DeckardREP,

 

I agree with @efialttes’s thought almost, I have made a test on my side and please take a try with the following workaround:21.JPG

 

22.JPG

 Within Condition box, click "Edit in advanced mode", type the following formula:

@empty(body('Filter_array'))

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 299 members 4,584 guests
Please welcome our newest community members: