web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Summary of Birthdays f...
Power Automate
Unanswered

Summary of Birthdays for the Week Flow

(0) ShareShare
ReportReport
Posted on by 17

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.'.

 

 

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @rodamalco 

     

    Can you give the json data of the above. Remove names with abc, def something. I might be able to help you then.

     

  • rodamalco Profile Picture
    17 on at

    I built a test list. This is all the data it has:

    rodamalco_0-1668436258403.png

     

    Here is the input expression I used for birthdays:

     

    formatDateTime(item()['Birthday'],'MM-dd')
     
    and this is input expression I used for "this week"
    formatDateTime(utcNow(),'MM-dd')

     

     

     

  • Sundeep_Malik Profile Picture
    6,484 on at

    @rodamalco 

     

    Can you try

    item().Birthday

     

    If this works, next we will see how we can send just one mail for all.

  • rodamalco Profile Picture
    17 on at

    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.'.

  • Verified answer
    RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    Not wishing to step on @Sundeep_Malik 's toes, but we do this every Monday morning at my company and so I have the flow already prepared. 

    In this example we only want the first 2 people, Chris Rea and David Paton, to be listed in the table in the email.

    0-SP-List.png

     

    1-Flow.png

     

    2-Flow.png

     

    3-Flow.png

     

    To avoid the apply to each you need to use a Select action:

    4-Flow.png

     

    The table is formatted as follows:

    Spoiler (Highlight to read)
    <style>
    table {
     border: 1px solid #1C6EA4;
     background-color: #EEEEEE;
     width: 80%;
     text-align: left;
     border-collapse: collapse;
    }
    table td, table th {
     border: 1px solid #AAAAAA;
     padding: 3px 2px;
    }
    table tbody td {
     font-size: 13px;
    }
    table thead {
     background: #1C6EA4;
     border-bottom: 2px solid #444444;
    }
    table thead th {
     font-size: 15px;
     font-weight: bold;
     color: #FFFFFF;
     border-left: 2px solid #D0E4F5;
    }
    table thead th:first-child {
     border-left: none;
    }
    </style>
    {outputs of the create html table action}
    <style> table { border: 1px solid #1C6EA4; background-color: #EEEEEE; width: 80%; text-align: left; border-collapse: collapse; } table td, table th { border: 1px solid #AAAAAA; padding: 3px 2px; } table tbody td { font-size: 13px; } table thead { background: #1C6EA4; border-bottom: 2px solid #444444; } table thead th { font-size: 15px; font-weight: bold; color: #FFFFFF; border-left: 2px solid #D0E4F5; } table thead th:first-child { border-left: none; } </style> {outputs of the create html table action}

     

    5-Flow.png

     

    6-Flow.png

     

    7-Email.png

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • Sundeep_Malik Profile Picture
    6,484 on at

    @RobElliott 

    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.

  • rodamalco Profile Picture
    17 on at

    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?

  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    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

  • rodamalco Profile Picture
    17 on at

    Got it. 

     

    Do you know why it keeps telling me this expressions is not valid:

     

    formatDateTime(addDays(outputs('Today')6)'yyyy-MM-dd')
  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard