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 / PowerApp breaks every ...
Power Apps
Answered

PowerApp breaks every time I add a schema to 'Response' action in the connected flow

(0) ShareShare
ReportReport
Posted on by 49

I have a PowerApp that connects to a Power Automate Flow. When an image is uploaded to the PowerApp the flow is triggered. The flow connects to a Form Recognizer API and I am trying to get the response back to PowerApps so I can use the data in the app. So essentially my flow is connected to the app, I can connect to the API in the flow, and everything is fine. Then I add a Response action to the flow and everything is still fine. When I add a schema to the Response action the flow disconnects from the PowerApp which I've gathered is normal. My issue is I cannot connect the flow back to the app even after the schema has changed and the flow is removed. I keep getting this error message:

 

Unable to add flow

There was a problem adding your service. Please try again later.

Session ID: (SessionID)

 

 

 

Categories:
  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    This is normally caused by some problem with the schema.  For example, do you have any properties in the schema where there are multiple types or data values that might be null?  Both of these can cause issues.  I normally find that its a good practice to clean your data in the flow before sending it back to Power Apps.  Using a combination of Data Select (to filter out unnecessary columns), filer array (to remove rows with null values) , and parse JSON to re-parse the new array of data before sending it back to Power Apps.

  • David59740 Profile Picture
    49 on at

    {
    "type": "object",
    "properties": {
    "status": {
    "type": "string"
    },
    "createdDateTime": {
    "type": "string"
    },
    "lastUpdatedDateTime": {
    "type": "string"
    },
    "analyzeResult": {
    "type": "object",
    "properties": {
    "version": {
    "type": "string"
    },
    "readResults": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "page": {
    "type": "integer"
    },
    "angle": {
    "type": "number"
    },
    "width": {
    "type": "integer"
    },
    "height": {
    "type": "integer"
    },
    "unit": {
    "type": "string"
    }
    },
    "required": [
    "page",
    "angle",
    "width",
    "height",
    "unit"
    ]
    }
    },
    "documentResults": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "docType": {
    "type": "string"
    },
    "pageRange": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "fields": {
    "type": "object",
    "properties": {
    "Items": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueArray": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueObject": {
    "type": "object",
    "properties": {
    "Name": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueString": {
    "type": "string"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array"
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "Quantity": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueNumber": {
    "type": "integer"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "TotalPrice": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueNumber": {
    "type": "integer"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    }
    }
    }
    },
    "required": [
    "type",
    "valueObject"
    ]
    }
    }
    }
    },
    "MerchantAddress": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueString": {
    "type": "string"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array"
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "MerchantPhoneNumber": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valuePhoneNumber": {
    "type": "string"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "ReceiptType": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueString": {
    "type": "string"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "Subtotal": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueNumber": {
    "type": "integer"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "Tax": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueNumber": {
    "type": "number"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "Tip": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueNumber": {
    "type": "number"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "Total": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueNumber": {
    "type": "number"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "TransactionDate": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueDate": {
    "type": "string"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    },
    "TransactionTime": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "valueTime": {
    "type": "string"
    },
    "text": {
    "type": "string"
    },
    "boundingBox": {
    "type": "array",
    "items": {
    "type": "integer"
    }
    },
    "page": {
    "type": "integer"
    },
    "confidence": {
    "type": "number"
    }
    }
    }
    }
    }
    },
    "required": [
    "docType",
    "pageRange",
    "fields"
    ]
    }
    }
    }
    }
    }
    }

     

     

     

     

     

     

    This is my schema, I've tried filtering and using the select action and I am still stuck, maybe I'm dumb but I cannot identify the issue with this

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    How did you get the schema?  Did you generate it using the Generate schema from sample button?  The first thing I noticed is that there are several required: sections.  To the best of my knowledge Power Apps/Power Automate only allow one.  I think you have more than one data set schema embedded here and I suspect that is the problem.  

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @David59740 ,

     

    1. Assume we pass the response as-is from Power Automate.
    2. and from PowerApp you can try to save the response in the collection

     

    ClearCollect(colName, FlowName.Run("JSON Data you want to convert to a collection"))

     

    Thanks

  • David59740 Profile Picture
    49 on at

    Thanks for the response @Pstork1. Yes I am generating as sample from the results of the GET request and it is bringing back the before mentioned schema.

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    If its not sensitive information could you post a sample of the data you are getting back from the Get Request?  I'll try to help with how to clean it up.

  • David59740 Profile Picture
    49 on at

    @Pstork1 I apologize for the format, the website would not let me upload since it exceeded the data limit.

     

     

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    Ok, I've got the sample data.  What specific data/fields are you trying to get back to use in Power Apps?

  • David59740 Profile Picture
    49 on at

    MerchantName, MerchantAddress, MerchantPhoneNumber, Subtotal, Tax, Tip, Total TransactionDate, TransactionTime

     

    And all confidence levels associated with each.

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    OK, let me play around with it a bit.  I've made some progress.  The problem is definitely related to the embedded schemas that are in the JSON that is returned.  I was able to isolate and return the full 'documentResults' array as a collection.  But drilling down into it gets blocked by the embedded schemas.  I need to find a way to isolate the specific fields you want.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard