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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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,501 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,501 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,525 Super User 2026 Season 1 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,501 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,525 Super User 2026 Season 1 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,525 Super User 2026 Season 1 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 223

#2
David_MA Profile Picture

David_MA 210 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 175

Last 30 days Overall leaderboard