cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Responsive Resident
Responsive Resident

Flow to check birthdays

HR would like me to use Flow to track the people who have Birthdays and send out an email listing today's each morning.

The first idea I had didn't work. I'm a little stuck on how to search the list to find them.

I have a list that includes Names and Birthdays. I have created a view with that info. After I set up a Daily run I put in a get Item step, but there is no dynamic data available for the Filter. Can I set up an array variable to hold the names with birthdays today?

I thought I knew how to set up that "loop" to look through the data, but I wasn't getting anywhere there either.

Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Flow to check birthdays

@empty(triggerBody()?['Birth_Date'])

 

Try with this.

 

Or Birth Date is not equal to null

View solution in original post

10 REPLIES 10
Highlighted
Resident Rockstar
Resident Rockstar

Re: Flow to check birthdays

@BrianS 

 

Can you have a look at https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Send-A-Happy-Birthday-Email-Messag... 

 

The YouTube tutorial at https://www.youtube.com/watch?v=QYMRfGOmSGI  

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

Highlighted
Responsive Resident
Responsive Resident

Re: Flow to check birthdays

Thanks for the link - I did not find that template when I searched. However, I am getting an error when the Flow runs:

Unable to process template language expressions for action 'Condition' at line '1' and column '14697': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'.

I put in the field that I use for Birthday which is a date field.Flow_BDay_01.jpg

Highlighted
Resident Rockstar
Resident Rockstar

Re: Flow to check birthdays

@BrianS 

 

Hey Mate,

 

From the Error it tells me the variable that you are using in formatDateTime expression is null.

 

I see you are using 'Compose' action above the condition and I assume it populate with correct date? If yes, try the expression below:

 

 

formatdatetime(<your variable> ,'yyyy-MM-ddThh:mm:ss')

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Highlighted
Resolver I
Resolver I

Re: Flow to check birthdays

You have any date empty? if you have any empty the conditional cannot perform the comparison. Try with two conditions, not empty and date equal

 

 

Highlighted
Responsive Resident
Responsive Resident

Re: Flow to check birthdays

There are some in the list with blank birthdays - would that keep it from evaluating the non-blank ones?

I tried your idea - but possibly not correctly - also note below you can see the expression for the condition in the comments to that step.Flow_BDay_03.jpg

Highlighted
Resolver I
Resolver I

Re: Flow to check birthdays

In your conditional, you keep trying check fields that dont have date with a date.

 

Try with two different conditionals, first "is not equal to empty", and IF TRUE check the dates. The empty fields go for NO and dont affect the flow.

Highlighted
Responsive Resident
Responsive Resident

Re: Flow to check birthdays

I'm still doing something wrong! Not really my area of expertise I have to admit.

Now I'm getting this error:

Unable to process template language expressions for action 'Condition_2' at line '1' and column '14701': 'The template language function 'empty' expects one parameter: the object, array or string to test for emptiness. The function was invoked with '0' parameter(s).

Here is the portion of the flow:

Flow_BDay_04.jpg

Do I have the wrong formula to check to see if the field is empty? Am I checking the wrong entity?

Highlighted
Resolver I
Resolver I

Re: Flow to check birthdays

@empty(triggerBody()?['Birth_Date'])

 

Try with this.

 

Or Birth Date is not equal to null

View solution in original post

Highlighted
Responsive Resident
Responsive Resident

Re: Flow to check birthdays

The check for null instead of empty did the trick! I had to change the Top Count to get it to do the entire list but all is working now

Thanks!

Where would I have put the 

@empty(triggerBody()?['Birth_Date'])

expression? I had thought I could cull the empty ones in the "Get Item" step, but I couldn't figure out how to do that. 

Highlighted
Resolver I
Resolver I

Re: Flow to check birthdays

Is in advanded mode but this option has been removed from condition. Try this way

 

*es igual a = is equal to

 

Im from Spain 😛

 

condition.png

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (5,866)