Reminder emails (Power Automate) - dealing with blank people field

%3CLINGO-SUB%20id%3D%22lingo-sub-2214284%22%20slang%3D%22en-US%22%3EReminder%20emails%20(Power%20Automate)%20-%20dealing%20with%20blank%20people%20field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2214284%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20you%20can%20help.%20I%20have%20a%20flow%20which%20sends%20emails%204%20days%20before%20a%20target%20date%20as%20reminders.%26nbsp%3B%20The%20datasource%20is%20a%20SharePoint%20Online%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20list%2C%20%3CEM%3ETargetCompletionDate%3C%2FEM%3E%20is%20a%20Date%2FTime%20column%20showing%20date%20only%20in%20a%20standard%20format.%20%3CEM%3EOwner%3C%2FEM%3E%20is%20a%20person%2Fgroup%20column%2C%20allowing%20selection%20of%20'People%20and%20Groups'.%26nbsp%3B%20It's%20this%20value%20used%20to%20send%20an%20e-mail%20for%20items%20nearing%20their%20completion%20date.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%20class%3D%22lia-list-style-type-square%22%3E%3CLI%3EOn%20the%20%3CFONT%20color%3D%22%23333399%22%3EGet%20Items%3C%2FFONT%3E%20action%2C%20there's%20a%20filter%20query%3A%20%3CSTRONG%3ETargetCompletionDate%20ne%20null%3C%2FSTRONG%3E%20to%20filter%20out%20items%20with%20blank%20'TargetCompletionDate'%20values%2C%20so%20the%20flow%20doesn't%20error%20on%20those%20items.%3C%2FLI%3E%3C%2FUL%3E%3CUL%20class%3D%22lia-list-style-type-square%22%3E%3CLI%3EA%20condition%20uses%20the%20'addDays'%20function%20adding%204%20days%20from%20now%20%26amp%3B%20checks%20against%20the%20'TargetCompletionDate'%20value%20(see%20screenshot%20Reminder%20Flow%203).%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%3CLI%3EIf%20that%20condition%20is%20met%20there's%20a%20second%20condition%20to%20only%20send%20emails%20if%20the%20'%3CEM%3EOwner%3C%2FEM%3E'%20value%20isn't%20blank%20(screenshot%20Reminder%20Flow%204).%26nbsp%3B%20If%20there's%20an%20email%20address%2C%20it%20sends%20the%20reminder%20email.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EQuestion%3A%20is%20there%20a%20better%20way%20to%20do%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstead%20of%20a%20Condition%2C%20can%20I%20use%20a%20Trigger%20Condition%20or%20an%20addition%20to%20the%20Filter%20Query.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20a%20few%20things%2C%20but%20with%20no%20success.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETrigger%20Conditions%20I've%20tried%3A%3C%2FP%3E%3CP%3E%40not(empty(triggerBody()%3F%5B'Owner'%5D))%3CBR%20%2F%3E%40not(empty(triggerBody()%3F%5B'Owner%2FEMail'%5D))%3CBR%20%2F%3E%40not(equals(triggerBody()%3F%5B'Owner'%5D%2Cnull))%3CBR%20%2F%3E%40not(equals(triggerBody()%3F%5B'Owner%2FEMail'%5D%2Cnull))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20strip%20out%20the%20existing%20Filter%20Query%2C%20I%20can%20get%20it%20to%20work%20with%20%3CSTRONG%3EOwner%20ne%20null%3C%2FSTRONG%3E%20--%20however%20I'll%20need%20to%20check%20TargetCompletionDate%20isn't%20empty%2C%20otherwise%20the%20flow%20will%20error%20on%20items%20where%20it%20is.%26nbsp%3B%20I'm%20not%20getting%20the%20syntax%20right.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20suggest%20alternatives%20to%20the%20second%20condition%20action%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2214284%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPower%20Automate%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

 

Hi there,

 

I hope you can help.

 

In Power Automate I want to check for blank email values in a people SharePoint column.

 

Design solution:

 

I have a flow which sends emails 4 days before a target date as reminders.  The datasource is a SharePoint Online list.

 

On the list, TargetCompletionDate is a Date/Time column showing date only in a standard format. Owner is a person/group column, allowing selection of 'People and Groups'.  It's this value used to send an e-mail for items nearing their completion date.

 

  • On the Get Items action, there's a filter query: TargetCompletionDate ne null to filter out items with blank 'TargetCompletionDate' values, so the flow doesn't error on those items.
  • A condition uses the 'addDays' function adding 4 days from now & checks against the 'TargetCompletionDate' value (see screenshot Reminder Flow 3).

  • If that condition is met there's a second condition to only send emails if the 'Owner' value isn't blank (screenshot Reminder Flow 4).  If there's an email address, it sends the reminder email.

Question: is there a better way to check for empty email values?

 

Instead of a condition, can I use a Trigger Condition or an addition to the Filter Query.

 

I've tried a few things, but with no success.

 

Trigger Conditions I've tried:

@not(empty(triggerBody()?['Owner']))
@not(empty(triggerBody()?['Owner/EMail']))
@not(equals(triggerBody()?['Owner'],null))
@not(equals(triggerBody()?['Owner/EMail'],null))

 

If I strip out the existing Filter Query, I can get it to work with Owner ne null -- however I'll need to check TargetCompletionDate isn't empty, otherwise the flow will error on items where it is.  I'm not getting the syntax right.

For instance, this isn't working: TargetCompletionDate ne null or Owner/EMail ne null

 

(I suspect this is because there will always be a ; (semi-colon) in the TO: field, using the Send an email notification (V3) action)

 

Can anyone suggest alternatives to the second condition action?

 

Thanks!

0 Replies