cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jayalessi
Frequent Visitor

Birthday Reminder Flow

Hello, I have a flow setup to email a reminder for someone's birthday. Here is the flow:

 

jayalessi_1-1649344307873.png

 

 

, but I am getting this error:

jayalessi_0-1649344252054.png

 

The expression I am using is:

formatDateTime(items('Apply_to_each')?['DOB'], 'MM-dd')
 
Could someone tell me what I am doing wrong?
7 REPLIES 7
mattias1172
Responsive Resident
Responsive Resident

It looks like a Null value was passed to the expression instead of a string. 

 

Can you double check the content being passed to the expression? 

@mattias1172 I'm not sure what you are asking for, could you clarify? Here is the whole flow:

jayalessi_0-1649420393722.png

 

 

In the error message you attached, Power Automate is saying that a "Null" value was passed to the formatedatetime() expression. This caused it to fail because this expression needs a value of type "string". 

 

If the expression received a "Null" value, nothing was passed to it, the value was empty. Double check that Power Automate is getting the correct value for "items('Apply_to_each')?['DOB']". 

This is what I have:

jayalessi_0-1649427565305.png

 

outputs('Get_Items')?['body/value']

 

Should this be DOB instead?

What option is it giving you for the Dynamic Content under the apply to each loop? If "Value" is your list, you should have dynamic content from the loop to iterate each item in the list. 

This is what I show, there are a lot of them but I just wanted to show the DOB one... I have value there now.... not sure what I am doing wrong. I just want to be able to have a notification emailed if someone's birthday is on that day...

 

jayalessi_0-1649440894758.png

 

jayalessi_1-1649440907917.png

 

Without having access to the data myself, i can't say for certain where the exact issue is. I can see you are pulling a list from SharePoint. This would create an array in Power Automate. Apply to Each then needs to loop through that array of DOBs to compare each one to the current date. 

 

Somewhere in this chain, a Null value is being passed. 

 

Can you confirm what data comes through when you select DOB from the above list? Are you getting an array, string, nothing? 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,751)