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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Happy Birthday message...
Power Automate
Answered

Happy Birthday message from API source to Teams chat

(0) ShareShare
ReportReport
Posted on by

Hi community,

 

I'm currently trying to build a flow to send our employees a Happy Birthday message to their Teams chat on their birthday.

I'm making an API POST call from our HRIS as the source of name and DOB.

Here's the JSON I'm using and getting a little stuck.

 

Screen Shot 2019-11-06 at 4.52.45 pm.png

Screen Shot 2019-11-06 at 4.55.35 pm.png

I've checked https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Send-A-Happy-Birthday-Email-Message-Without-The-Use-Of-A-List/ba-p/259111

and

https://powerusers.microsoft.com/t5/Building-Flows/Send-a-Happy-Birthday-email-to-employees-on-their-birthday/m-p/154334#M15542

however am facing an issue when trying to parse the JSON.

 

I originally tried:

 

 

{
 "type": "object",
 "properties": {
 "title": {
 "type": "string"
 },
 "fields": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "id": {
 "type": "string"
 },
 "type": {
 "type": "string"
 },
 "name": {
 "type": "string"
 }
 },
 "required": [
 "id",
 "type",
 "name"
 ]
 }
 },
 "employees": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "id": {
 "type": "string"
 },
 "dateOfBirth": {
 "type": "string"
 },
 "displayName": {
 "type": "string"
 },
 "workEmail": {
 "type": ["string","null"]
 }
 },
 "required": [
 "id",
 "dateOfBirth",
 "displayName",
 "workEmail"

 

 

but changed to:

 

 

{
 "title": "Report",
 "fields": [
 {
 "id": "dateOfBirth",
 "type": "date",
 "name": "Date of Birth"
 },
 {
 "id": "displayName",
 "type": "text",
 "name": "Display Name"
 },
 {
 "id": "workEmail",
 "type": "email",
 "name": "Work Email"
 }

 

 

Any help would be kindly appreciated!

ps. kind of new to this, so go easy 😊 

 

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

     

    Hi @Anonymous ,

     

    I am afraid I don't quite understand how you implemented this requirement because I can't know the sample output from the HTTP action.

    But it seems that you should configure the content of the HTTP action output first in the location shown below to generate the schema:

    63.PNG

    Please refer to this blog for more details on Parse JSON:

    http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    on at

    Hey @v-bacao-msft ,

     

    Thanks for the reply.

     

    Here's the schema I'm trying to parse using the parse JSON action.

    I would iterate through each "employee" and and retrieve their birthday and email address to use in further actions.

    {
     "type": "object",
     "properties": {
     "title": {
     "type": "string"
     },
     "fields": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "id": {
     "type": "string"
     },
     "type": {
     "type": "string"
     },
     "name": {
     "type": "string"
     }
     },
     "required": [
     "id",
     "type",
     "name"
     ]
     }
     },
     "employees": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "id": {
     "type": "string"
     },
     "dateOfBirth": {
     "type": "string"
     },
     "displayName": {
     "type": "string"
     },
     "workEmail": {
     "type": "string"
     },
     "status": {
     "type": "string"
     }
     },
     "required": [
     "id",
     "dateOfBirth",
     "displayName",
     "workEmail",
     "status"
     ]
     }
     }
     }
    }

     

  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @Anonymous ,

     

    Please refer to the following method to filter out users whose birth date is equal to the current date and obtain their email address.

    45.PNG

    @equals(formatDateTime(item()['dateOfBirth'], 'MM-dd'), utcNow('MM-dd'))

     

    Best Regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard