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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Getting Employee ID number from API from a webhook

(0) ShareShare
ReportReport
Posted on by 36

Hi,

We use some HR software and I need to get out of the HR software using webhooks a specific number that I can then use in another application to create Holiday appointments in a schedule. 

 

When the request is recieved into flow it just dumps like this 


[{"key":"{\"ActionId\":\"6\",\"Action\":\"Holiday Deleted\",\"EmployeeId\":\"36\",\"HolidayType\":\"A day or more\",\"StartDate\":\"2019-10-21\",\"EndDate\":\"2019-10-21\",\"HolidayRecordedIn\":\"Days\",\"PartOfDay\":\"\",\"StartDatePartOfTheDay\":\"\",\"EndDatePartOfTheDay\":\"\",\"Duration\":\"1.00\",\"Comments\":\"TEST DONT APPROVE\",\"IsToilHoliday\":\"No\"}","value":""}

 

So i wanted to convert this to a string which I'm doing but I have no idea what the best way of getting the employee ID value is in Flow? In this case I just want "36" returned but it could be any number depending on the employee.


Thanks

 

I have the same question (0)
  • abm abm Profile Picture
    32,600 Most Valuable Professional on at
    Re: Getting Employee ID number from API from a webhook

    Hi @RyanMesser 

     

    Is this the JSON result sets?  Could you please post another result sets as well. The one below is missing some square brackets?

     

    Thanks

  • RyanMesser Profile Picture
    36 on at
    Re: Getting Employee ID number from API from a webhook

    Yes, it returns in JSON so when a change is made on the HR App side it triggers flow, I'm then convering that JSON into a string. 


    I've put in a condition that looks for "Approved" as this is the action I'm looking for, the JSON for that looks like the below. So I need to get the Employee ID number in this case its "84"

     

    [
    {
    "key": "{\"ActionId\":\"8\",\"Action\":\"Holiday Approved\",\"EmployeeId\":\"84\",\"StartDate\":\"2020-08-17\",\"EndDate\":\"2020-08-28\",\"HolidayRecordedIn\":\"Days\",\"Duration\":\"10\",\"Comments\":\"\",\"AuthorisedByFirstName\":\"Ryan\",\"AuthorisedByLastName\":\"Messer\",\"HolidayType\":\"A day or more\",\"PartOfDay\":\"\",\"StartDatePartOfTheDay\":\"\",\"EndDatePartOfTheDay\":\"\",\"IsToilHoliday\":\"No\"}",
    "value": ""
    }
    ]

     

     

  • abm abm Profile Picture
    32,600 Most Valuable Professional on at
    Re: Getting Employee ID number from API from a webhook

    Hi @RyanMesser 

     

    Thanks for the reply. It's a bit odd that it shows key amd value attribute as null. Lets see what I could do with it. Will let you know soon.

     

    Thanks

  • Verified answer
    abm abm Profile Picture
    32,600 Most Valuable Professional on at
    Re: Getting Employee ID number from API from a webhook

    Hi @RyanMesser 

     

    This is what you need to do.

    ii1.png

    ii2.png

     

    The above schema is as follows (Copy and paste the below in your flow step)

    {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "key": {
    "type": "string"
    },
    "value": {
    "type": "string"
    }
    },
    "required": [
    "key",
    "value"
    ]
    }
    }

     

     

    ii3.png

     

    The above schema is as follows:

    {
    "type": "object",
    "properties": {
    "ActionId": {
    "type": "string"
    },
    "Action": {
    "type": "string"
    },
    "EmployeeId": {
    "type": "string"
    },
    "StartDate": {
    "type": "string"
    },
    "EndDate": {
    "type": "string"
    },
    "HolidayRecordedIn": {
    "type": "string"
    },
    "Duration": {
    "type": "string"
    },
    "Comments": {
    "type": "string"
    },
    "AuthorisedByFirstName": {
    "type": "string"
    },
    "AuthorisedByLastName": {
    "type": "string"
    },
    "HolidayType": {
    "type": "string"
    },
    "PartOfDay": {
    "type": "string"
    },
    "StartDatePartOfTheDay": {
    "type": "string"
    },
    "EndDatePartOfTheDay": {
    "type": "string"
    },
    "IsToilHoliday": {
    "type": "string"
    }
    }
    }

     

    ii4.png

     

    Here is my test result:

    ii5.png

     

    If you need any further help please let me know.

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

     

    Thanks

  • RyanMesser Profile Picture
    36 on at
    Re: Getting Employee ID number from API from a webhook

    Thanks a lot for that! That works, and I can see what your doing now so I will use this for future reference. 

     

    Only difference I have is that the trigger is using the request trigger but effectively the same steps.

     

    Thanks again

     

    Ryan

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard