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 / Detect null output fro...
Power Automate
Answered

Detect null output from Search for Users (V2)

(0) ShareShare
ReportReport
Posted on by 1,934 Moderator

I'm using the Get user profile connector to show when an email address is valid. When it is NOT valid, the input JSON looks like this:

{
 "host": {
 "connectionReferenceName": "shared_office365users",
 "operationId": "UserProfile_V2"
 },
 "parameters": {
 "id": "xxxxx@badaddress.edu",
 "$select": "userPrincipalName"
 }
}

I put this expression into the connector:

inputs('getProfile')?['parameters']?['id']

But it gives this error:

InvalidTemplate. Unable to process template language expressions in action 'Append_to_array_variable_2' inputs at line '1' and column '32249': 'The template function 'inputs' is not defined or not valid.'.

 Here's a screencap of the editor:

annetoal_0-1636043697170.png

 

Please help. I need to append the bad emails into the array badAddresses

 

Thanks,

Anne 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    12,051 Super User 2026 Season 1 on at

    The actions function will be able to get the bad email address:

    2021-11-04_17-37-30.png

    2021-11-04_17-37-49.png

    The above expression is:

    actions('Get_user_profile')?['inputs/parameters/id']

    For your flow it will be: 

    actions('getProfile')?['inputs/parameters/id']

     

    This is the output from the above flow:

    2021-11-04_17-38-27.png

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • annetoal Profile Picture
    1,934 Moderator on at

    @ekarim2020 You are truly meritorious of the label "Rockstar." It worked like a champ. Thank you so much.

     

    Anne

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 921

#2
Valantis Profile Picture

Valantis 801

#3
Haque Profile Picture

Haque 588

Last 30 days Overall leaderboard