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



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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

6 REPLIES 6
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...



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


annajhaveri
Community Champion
Community Champion

@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.
pradeep_kumar
Frequent Visitor

Hi Anna,

 

Greate your work...

but I want to create page for work anniversary to teammate and this page convert into image when this image send automatically to teammate from power automate according to mail merge   

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,749)