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 Automate / Custom API fails to lo...
Power Automate
Answered

Custom API fails to load data on form

(0) ShareShare
ReportReport
Posted on by

Hi All, 

 

Try to test a connecting to an azure function. Everything is good until i try to use the connection on the form. Receive an error that "The Data returned in the response is invalid". I am using the default azure functions test function to try and pull in name to a field. The test of the function in power apps succeeds but not on the form. Any help with why it failes out on the form but not on the test conections or suggestions on troubleshooting would be appreciated. Swagger file below - 

 

{
 "paths": {
 "/api/Function1": {
 "get": {
 "operationId": "RunThis",
 "summary": "Default API function",
 "description": "Calls my default Azure Function over Https",
 "responses": {
 "200": {
 "description": "Successful response",
 "schema": {
 "x-oad-type": "string",
 "type": "string",
 "title": "The response of the api."
 }, 
 "x-oad-type": "response"
 }
 },
 "parameters": [
 {
 "name": "code",
 "in": "query",
 "description": "code",
 "required": false,
 "type": "string",
 "default": "<code>",
 "x-oad-type": "parameter"
 },
 {
 "name": "name",
 "in": "query",
 "description": "Name Value ",
 "required": true,
 "type": "string",
 "x-oad-type": "parameter"
 }
 ]
 },
 "x-oad-type": "operation"
 },
 "/api/CreateBarcode": {
 "get": {
 "operationId": "CreateBarcode",
 "summary": "Generates Barcode image",
 "description": "Generate a barcode file ",
 "responses": {
 "200": {
 "description": "Successful response",
 "schema": {
 "x-oad-type": "string",
 "type": "string",
 "title": "The Response of the API"
 }, 
 "x-oad-type": "response"
 }
 },
 "parameters": [
 {
 "name": "code",
 "in": "query",
 "description": "code",
 "required": false,
 "type": "string",
 "default": "<code>",
 "x-oad-type": "parameter"
 },
 {
 "name": "Number",
 "in": "query",
 "description": "Number to create barcode from",
 "required": false,
 "type": "integer",
 "format": "int32",
 "x-oad-type": "parameter"
 }
 ]
 },
 "x-oad-type": "operation"
 }
 },
 "info": {
 "title": "BarCodeGenerator",
 "version": "1.0.0",
 "description": "Testing Barcode Generation via PowerApps"
 },
 "host": "tpgeneratebarcode.azurewebsites.net",
 "basePath": "/",
 "schemes": [
 "https"
 ],
 "consumes": [],
 "produces": [
 "application/json" ,
 "text/plain; charset=utf-8"
 ],
 "swagger": "2.0"
}

 

 

 

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Could you share more details on Form? Is it an EditForm on PowerApps?

    How is your flow created? Please share more a screenshot of your flow?

    Please make sure the corresponding response has been defined. Please check the doc on Connector definition for more details:

    https://docs.microsoft.com/en-us/connectors/custom-connectors/define-blank#create-the-connector-definition

     

    Best regards,

    Mabel

  • Community Power Platform Member Profile Picture
    on at

    Hi Mabel, 

     

    I was trying to follow an older article - 

    https://powerapps.microsoft.com/en-us/blog/building-a-custom-api-for-powerapps-using-azure-app-service-web-apps/

     

     

     

    the test for the connector succeeds but fails when being used in the form 

     

    https://brakepartsinc-my.sharepoint.com/:i:/p/kevin_oliver/ESE58MWqrMRDiARhRGbBPSQBJk8CwTHrTLXpj_dktEGFxw?e=kPWeGf

     

    The form has 2 text fields and a button, the button calls the function (UpdateContext({varOutput:BarCodeGenerator.RunThis(TextInput1.Text)}) ) Then the varOutput is set to the second text field. This all works fine with a static value, but fails when trying to call the RunThis() function from azure

     

    https://brakepartsinc-my.sharepoint.com/:i:/p/kevin_oliver/EdivnpUe0nJAmFcZPhr469IB5axLjwyofOsi731vqmXgIg?e=9FH0Rx

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I also see this got added in the wrong forum, i'll move it over to the power apps section

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard