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

Sending Birthday and Work Anniversary Emails to employees - Issue with dates

Hello, 

 

I have successfully created both a birthday and anniversary flow to be emailed to employees on their birthday and work anniversary. However, the flow is also sending it to individuals who have similar but not exact dates. 

 

For example:

John Doe's birthday is today 1/5 (January 5th) the flow emailed him as well as Mary Smith who's birthday is 5/1 (May 5th) how do I keep it from doing that? 

 

I've attached how I've set my date format up as well as my condition. The first output in the condition step is "set month" and the second is "set date" 

 

Thank you!! 

 

 

 

Date FormatDate FormatSplitSplitSet MonthSet MonthSet DaySet DayConditionCondition

2 ACCEPTED SOLUTIONS

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @leeleeisfree,

 

My guess is that you need to apply some datetime formatting to the birthday values. Can you show a bit more details of your flow. For instance a screenshot of your condition action?

 

Btw, this Power Automate blog from @AlanPs1 has some good expression examples on how to use formatting with birthday fields.

 

The approach is basically:

formatDateTime(body('Get_user_profile_(V2)')?['birthday'], 'MM-dd')

equals

formatDateTime(utcNow(), 'MM-dd')

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Send-A-Happy-Birthday-Email-Messag...

View solution in original post

@leeleeisfree , as @Expiscornovus  has suggested, please modify your condition as follows:

 

on left side

formatDateTime(items('Apply_to_each')?['DOB'], 'MM-dd')

on right side

formatDateTime(utcNow(), 'MM-dd')

so your condition will look as follows:

annajhaveri_0-1609932863883.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @leeleeisfree,

 

My guess is that you need to apply some datetime formatting to the birthday values. Can you show a bit more details of your flow. For instance a screenshot of your condition action?

 

Btw, this Power Automate blog from @AlanPs1 has some good expression examples on how to use formatting with birthday fields.

 

The approach is basically:

formatDateTime(body('Get_user_profile_(V2)')?['birthday'], 'MM-dd')

equals

formatDateTime(utcNow(), 'MM-dd')

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Send-A-Happy-Birthday-Email-Messag...

View solution in original post

annajhaveri
Super User
Super User

@leeleeisfree can you please share the screenshot of the flow to see where exactly the issue is, there must be something wrong related to data you are fetching for birthdays/anniversaries.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

I have edited my post to include screenshots. Thank you so much!!! 

I have edited my post to include screenshots. Thank you!!!! 🙂 

@leeleeisfree , as @Expiscornovus  has suggested, please modify your condition as follows:

 

on left side

formatDateTime(items('Apply_to_each')?['DOB'], 'MM-dd')

on right side

formatDateTime(utcNow(), 'MM-dd')

so your condition will look as follows:

annajhaveri_0-1609932863883.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,564)