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 / Lookup a value in powe...
Power Automate
Answered

Lookup a value in power automate

(0) ShareShare
ReportReport
Posted on by 39

Hi,

I have a flow that gets data via an HTTP step.
The output includes several fields where my interest is in two fields: URL, and group ID:

Moshema_0-1667199923933.png

 


I have an excel and in the excel I have a column with the URL.

Moshema_1-1667199981615.png

 

I want to check in the JSON the URL from excel and if it finds it to receive the group ID and if not to do something else.

I'll really appreciate it if someone can help me.



Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    I'd suggest using a Filter array on the locations array in your JSON.

     

    In my example I've assumed you are looping over each of the rows in your Excel file.

     

    See my example below. I'll go into each of the actions.

    grantjenkins_1-1667202348691.png

     

    Compose just contains a sample of your data you retrieve from HTTP. And Parse JSON gets me nice properties I can refer to. You can skip these steps as you already have your data.

    grantjenkins_2-1667202819432.png

     

    List rows present in a table gets my Excel data.

    grantjenkins_3-1667202860907.png

    My Excel data for this example has the following:

    grantjenkins_4-1667202900209.png

     

    Next, I use an Apply to each to iterate over each of the rows from Excel. I then have a Filter array that takes in the locations array from my Parse JSON action and filter on url is equal to Location (from the current row)

    grantjenkins_5-1667203009020.png

     

    This will return a filtered array of objects where the url matched. We can then use a Condition to check if the length of the Filter array is greater than 1, and apply the appropriate actions for true or false.

     

    The expression to get the length of the array is:

    length(body('Filter_array'))

     

    grantjenkins_6-1667203195750.png

     

    If you then wanted to extract out the group Id from the Filter array you could use a first expression as we assume it's only returned a single result, but still an array.

    first(body('Filter_array'))?['groupId']

    grantjenkins_8-1667203342233.png

     

    Hope that helps and is what you were after.

  • Moshema Profile Picture
    39 on at

    @grantjenkins  amazing, thank you.

     

    Just a little question from where do you take the group ID

    in 

    first(body('Filter_array'))?['groupId']
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    The Filter array will contain all the properties from your JSON including the groupId.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard