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 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:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard