cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mlibbrecht2906
Regular Visitor

Send a Happy Birthday email to employees on their birthday

Hi,

 

i'm very new in the world of Flow but my hr team has asked me to look up something to sent birthday wishes for employees.

 

i found a template in flow but since i never used it i face some issues.

https://emea.flow.microsoft.com/en-us/galleries/public/templates/b6e38eb5fda442069ea2acf299a31d3e/se...

using the template i create a sharepoint list with the three columns employeename, birthday and email but it fails .

here is the error message that i receive : 

 
InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2598': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details
 
can you assist me ?
thanks a lot in advance
1 ACCEPTED SOLUTION

Accepted Solutions

The template assumes that there is a field in your list that is called "Birthday Date" (with the space so that the internal name is called within the condition

 

formatDateTime(items('Apply_to_each')?['Birthday_x0020_Date'], 'MM-dd')
 
Can you check the internal name of your Birthday Date column by going to the sharepoint list settings. Click on the birthday column. Then in the url you will find the internal name.
 
 

View solution in original post

9 REPLIES 9

The template assumes that there is a field in your list that is called "Birthday Date" (with the space so that the internal name is called within the condition

 

formatDateTime(items('Apply_to_each')?['Birthday_x0020_Date'], 'MM-dd')
 
Can you check the internal name of your Birthday Date column by going to the sharepoint list settings. Click on the birthday column. Then in the url you will find the internal name.
 
 

View solution in original post

v-yuazh-msft
Community Support
Community Support

Hi @mlibbrecht2906,

 

The error message told that the Birthday Date of an item in the list is empty,please make sure all the Birthday Date in the list wouldn't empty so the issue wouldn't accur.

 

Also you could add a condition in your flow to check if the Birthday Date is empty as below:

Capture.PNG

 

 

Best regards,

Alice

that worked!

 

now i also had to create a new column named "first name" otherwise the email won't go.

 

i'm very beginner in flow but would it possible to add a condition and have, depending of the users a different action.

for instance : 

people based in HQ --> a post created on the intranet 

people homebased --> an email sent to them

I wonder if anybody would know why I am getting this error message, even though I still get the email?

Nevermind, I figured it out. I had a condition that had no action related to it.

Chow for now.

Capture.PNG

Anonymous
Not applicable

I and very new to Microsoft FLow and created a flow and its failing again and again.

 

Please help.

 

SharePoint Data Snapshot:

Capture1.PNG

 

Flow:

Condition: 

formatDateTime(items('Apply_to_each')?['Birthday_x0020_Date'], 'MM-dd')
 
Is Equal To
 
formatDateTime(utcNow(), 'MM-dd')
 
Error:
ActionFailed. An action failed. No dependent actions succeeded.
 
InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2621': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
Jay555
Frequent Visitor

It looks as if you need to change the format of the date from mm/dd/yyyy

to mm-dd

Anonymous
Not applicable

Hi,

Send Happy birthday post in teams channel is working fine. But the thing is ,I will have to mention Employee name , so  when i mousehover on the employee name it should work as it works in teams when posted normally without flow.

 

Like When we want to notify a person in Teams post, we make use of @Employeename to notify that person.

 

But this doesn't work when posted from flow. Is there a way to achive this. 

Please help.

 

Thanks in advance

 

regards,

Sriraksha KS

 

@Anonymous 

 

The answer is No. 

 

The API that is used doesn't accept @ Mentions the same is the case for the Yammer Connector in Flow.

Anonymous
Not applicable

@Pieter_Veenstra 

Thanks for the reply 🙂

 

I hope ,this can be achieved atleast in up coming days!!!

 

Regards,

Sriraksha

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,718)