I am trying to create a flow that sends a weekly email for birthdays that in the next 7 days. The birthdays are all in a List that I am connecting to in the flow.
Things I'm having trouble with:
1) I want a summary email and not an "apply to each" because I do not want an individual email for each of the birthdays
2) I keep getting an error message for the action that looks for the birthday: InvalidTemplate. Unable to process template language expressions in action 'Birthday' inputs at line '0' and column '0': 'The template language expression 'formatDateTime(item()['Birthday'],'MM-dd')' cannot be evaluated because property 'Birthday' cannot be selected. Please see https://aka.ms/logicexpressions for usage details.'.
solved - @length(outputs('Get_items')?['body/value']) greater than 0
In case no birthdays for the week, how to stop the flow to send email?
Thank you so much!
We just have another flow that runs a couple of hours after the first one that updates those items that are less than or equal that day's date by adding 1 to the year using the expression
Rob
Thank you! What I meant was avoiding having to update the list every year with by changing the year. It would be nice if I could just leave the DOB as DOB, but the "today" and "today+6" only look at day and month.
You've missed out the commas before the 6 and after the 6), it should be:
formatDateTime(addDays(outputs('Today'),6),'yyyy-MM-dd')
Rob
Los Gallardos
Got it.
Do you know why it keeps telling me this expressions is not valid:
You should use the year in the compose actions because otherwise you will have a problem with the filter query. But you'll see that the email just uses the day, date and month without the year.
Rob
Los Gallardos
This is super helpful. I will try it now. Is there a way to just use the day and month and not have to update the year to show the "next" birthday?
No Problem Man. You already have the flow created that would definitely help him. I was also gonna suggest the select method. I was thinking to create a similar database, atleast your post saved me from doing that. Hehe.
@rodamalcoHis answer is correct, you should follow it.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492