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

How to add work anniversary number when sending automated email via power automate

Hello

 

I am looking to send automated email to my team members with the number

eg: happy 1st work anniversary, happy 2nd work anniversray etc

 

Is there a way to add number also in the body of the email

The tutorials i saw so far is not having number

Its just wishing them a happy work anniversary

1 ACCEPTED SOLUTION

Accepted Solutions
ArchitectMadhan
Super User
Super User

Hi @aparnaa ,

Usually we can use Compose and Variable to get the difference in the year and store it in Variable that can be further used in the email.  Here is the link that has steps to find the difference between years.

https://powerusers.microsoft.com/t5/General-Power-Automate/Getting-years-between-two-dates/td-p/8151...

 

Please accept it as a solution and give thumbs up, if it works for you.

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.

View solution in original post

4 REPLIES 4
ArchitectMadhan
Super User
Super User

Hi @aparnaa ,

If you are storing the Date Of Joining of an employee in the Employee record, then you can filter the Employee records daily based on the Date Of Joining (Day and Month) is equal to today (Day and Month) then it will give the list of employees who are celebrating the Work Anniversary for that day (This can be achieved using Scheduled Flow).

For calculating the number of years you can use the variable of integer type, in which you can store the number of years by just subtracting the year of joining from current year. The below links might be useful for you while dealing with the dates in power automate.

https://debajmecrm.com/how-to-get-year-month-and-day-in-various-formats-from-a-date-in-power-automat...

 

https://powerusers.microsoft.com/t5/Building-Flows/Sending-Birthday-and-Work-Anniversary-Emails-to-e...

 

Please accept it as a solution and give thumbs up, if it works for you.

 

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.
ArchitectMadhan
Super User
Super User

Hi @aparnaa ,

 

If the above solution is helpful for your scenario, please accept it as solution by clicking the button, so that it will be useful for others who come up similar issues.

 

Thanks,

Madhan

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.
aparnaa
Frequent Visitor

@ArchitectMadhan 

 

Thank you for your guidance

I have been able to progress after you suggestions

 

I checked https://debajmecrm.com/how-to-get-year-month-and-day-in-various-formats-from-a-date-in-power-automat...

 

However i am not sure how to subtract 2 integers.

Request your guidance 

 

I am saving my Date of Joining in DOJ field which is a date field

I am looking to subtract this year - DOJ's year and save them in an integer and add them in the email body

 

ArchitectMadhan
Super User
Super User

Hi @aparnaa ,

Usually we can use Compose and Variable to get the difference in the year and store it in Variable that can be further used in the email.  Here is the link that has steps to find the difference between years.

https://powerusers.microsoft.com/t5/General-Power-Automate/Getting-years-between-two-dates/td-p/8151...

 

Please accept it as a solution and give thumbs up, if it works for you.

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,418)