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 Apps / Condition if body cont...
Power Apps
Unanswered

Condition if body contains

(0) ShareShare
ReportReport
Posted on by 23

Hi all

I'm building an application in Powerapps that uses an API, the request will confirm if the input user already exists.

Basically everything is working, but the condition is not...

 

The API respond if a user does not exists:

body: []


If the API respond with a full json if the user exists

 

My flow condition is like: If body contains variable"email@contoso.com" 

But he is not detecting the variable "email" in the JSON response, I even added LESS THAN 3

to separate the true or false, because if the user does not exists the response from the API is "[]"

 

Rubenfrreis_1-1613123680442.png

 

Any tips?

Thank you alll

 

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Rubenfrreis ,

    This seems a PowerAutomate question rather than a PowerApps one, but let me give a try. 

    My thinking is to insert a new action Parse JSON with body as input value and the schema given by the JSON API response format. 

    Then in condition: use the length() function for "email" column from Parse JSON  equal to 0.

     

    Hope it helps !

  • Rubenfrreis Profile Picture
    23 on at

    Thank you for the reply,

     

    Using the Parse JSON and after that, point to the email field and make check if it is equal to variable (email@something.com), flow transform the process to Apply to Each because is a JSON field.

    It is not possible to send response to powerapp with Apply to each, and I'm struggling in here.

     

    The api respond with a Json format where one of those format is:

    First name: email

    Last name: test

    email: email.test@something.com

     

    If the user does not exists, it basically reply with a Json:

    random stuff and with the body:

    "Body":[]

     

    I want to send a message back to the app if the user already exists.

    I can use the email from the json to compare it exists, but I can't respond to powerapp

     

    Rubenfrreis_0-1613149241730.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard