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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / JSON filtering & Condi...
Power Automate
Suggested Answer

JSON filtering & Conditions Question(s).

(1) ShareShare
ReportReport
Posted on by 4
Hi All, 
 
I am trying to setup a flow that works a two step proces.
Step 1 is to get the current employees from our CRM system using a HTTP request, to filter this JSON Array and then proceed to,
Step 2 which, should be iterating through the items and do another HTTP request to get the status of their hours reporting. 
 
 
So-far I am able to filter the output of the first HTTP request with a condition (the CRM System has some system users) to filter only users with a name. (length(items('Apply_to_Each')['name']) > 0) as this is a array PowerAutomate does create a 'Apply to each'. The 'True' section thus leads to the second phase of the puzzle where I lose the understanding and therefore have my questions. 
 
1. The JSON output of the 'Parse JSON - Fetches hours submission status, by date, for an employee' does not contain the Name nor E-mail which I need for the Teams bit, how do I forward that on? 
2. The JSON output of the 'Parse JSON - Fetches hours submission status, by date, for an employee' contains 7x a 'submitted' leading to 7x a 'thanks' or 'action please' message, how can I limit it to one time? 
 
Thanks in advance for your feedback. 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
    Hi
     
    Can you share what your JSON looks like so its easier to answer.
     
    Thanks
     
  • CU04101917-0 Profile Picture
    4 on at
    Ok, so I managed to solve no. 1 by adding a compose action. (see the updated flow here:) (added some comments hence no new desiger ;-))
     
     
    The JSON / Output the HTTP action provides is:  
     
    {
      "data": [
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-09-30",
          "status""submitted"
        },
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-10-01",
          "status""submitted"
        },
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-10-02",
          "status""submitted"
        },
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-10-03",
          "status""submitted"
        },
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-10-04",
          "status""submitted"
        },
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-10-05",
          "status""submitted"
        },
        {
          "employee_id""employee:4e4584c93e7e2bf1",
          "date""2024-10-06",
          "status""submitted"
        }
      ],
      "errors"null,
      "debug"null
    }
     
    The JSON, Compose 3 (in the apply to each), provides to solve no 2. is the following:
    {
      "id""employee:4e4584c93e7e2bf1",
      "label""",
      "work_email""first.last@domain.com",
      "employment_status""active",
      "name""First Last",
      "status""submitted"
    }
     
    So now I am trying to get the 7x submitted to be limited to one, any suggestions? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard