cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Adding Flow to Canvas App > Failed during HTTP Request

Hi,

 

i know this has been a topic in some other post but those couldn't help me.

As mentioned in these posts...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Failed-during-http-send-request-whe...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/PowerApps-Flow-Button-returns-quot-...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Problem-adding-Flow-to-PowerApps-Fa...

...while getting no errors executing the flow for itself i get an error when adding the flow to my Canvas App.

Using different browsers or creating the flow out of my App as mentioned in the posts above didn't help.

 

I use an array to fill a table within a word template as shown below.

It seems like the array is the problem since some users wrote about problems with "apply to each"-blocks. Additionally the problem only occurs, when i add the "ask in PowerApps"-statement to the "table"-part of my template.

Using a hardcoded array, i can add the Flow to my App and use it providing the single-column-texts through PowerApps. The table within the template is then filled with the pre-entered content.

 

 

Hope someone can help me with this.

 

Regards,

Julian

 

 

"Failed during HTTP-Sendrequest" when adding Flow to a Button"Failed during HTTP-Sendrequest" when adding Flow to a ButtonPopulate Wordtemplate in FlowPopulate Wordtemplate in Flow

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

Based on the issue that you mentioned, I think there is something wrong with your flow's configuration.

 

Currently, within MS Flow (Power Automate), it could only accept text string parameter passed from a canvas app. Passing an array value from a canvas app into a flow directly is not supported within PowerApps and MS Flow.

 

As an alternative solution, you should convert the table value into a JSON String value within your app firstly, then pass the converted JSON String value as parameter into your flow, then within your flow, you could use the json function (WDL expression) to convert the passed JSON string value into a JSON Table again, then typed the JSON Table (array data) into the "Tabelle" field of the "Populate a Microsoft Word template" action.

 

On your side, you should re-configure your flow as below:

4.JPG

Add a "Compose" action before the "Populate a Microsoft Word template" action in your flow, then type in "Ask in PowerApps" dynamic content within the "Inputs" field. (The "Compose" action is used to receive JSON String value passed from your app)

Then within your  "Populate a Microsoft Word template" action, set the "Tabelle" field to following formula:

json(triggerBody()['Compose_Inputs'])

 

Within your app, you should convert the Table value (you want to pass to flow) into a JSON String value firstly, then use the converted JSON String value as argument within the 'FlowName'.Run(...) formula to pass to your flow:

The table value I want to pass from app to flow looks like below:

5.JPG

The app's configuration as below:

6.JPG

 

More details about the JSON function in PowerApps, please check the following article:

JSON function

 

Please also check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Capture-Image-and-Save-as-Attachment/m-p/360072

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Pstork1
Dual Super User
Dual Super User

try creating an explicit array variable in the Flow and add your Ask in PowerApps to that.  That way its expecting the parameter to be an array and not a table.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Created an array to fill it into my template as you can see below but still the same error 😕

 

Create_Array.png

I'm not clear on what your document is expecting.  Is it expecting a data table or an array?  They aren't the same thing.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

I added a screenshot from my wordtemplate and the resulting table.

In this case i used following array:

[

 {"Kategorie":"A", "Beschreibung":"B", "Preis":"C"},

 {"Kategorie":"D", "Beschreibung":"E", "Preis":"F"},

]

 

WordtemplateWordtemplateResulting tableResulting table

If you created the variable as I suggested then I would look at the results from a failed run to troubleshoot and see what is actually coming across as the array.  I suspect you aren't getting what you think you are in the array.



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

Hi @Anonymous ,

Based on the issue that you mentioned, I think there is something wrong with your flow's configuration.

 

Currently, within MS Flow (Power Automate), it could only accept text string parameter passed from a canvas app. Passing an array value from a canvas app into a flow directly is not supported within PowerApps and MS Flow.

 

As an alternative solution, you should convert the table value into a JSON String value within your app firstly, then pass the converted JSON String value as parameter into your flow, then within your flow, you could use the json function (WDL expression) to convert the passed JSON string value into a JSON Table again, then typed the JSON Table (array data) into the "Tabelle" field of the "Populate a Microsoft Word template" action.

 

On your side, you should re-configure your flow as below:

4.JPG

Add a "Compose" action before the "Populate a Microsoft Word template" action in your flow, then type in "Ask in PowerApps" dynamic content within the "Inputs" field. (The "Compose" action is used to receive JSON String value passed from your app)

Then within your  "Populate a Microsoft Word template" action, set the "Tabelle" field to following formula:

json(triggerBody()['Compose_Inputs'])

 

Within your app, you should convert the Table value (you want to pass to flow) into a JSON String value firstly, then use the converted JSON String value as argument within the 'FlowName'.Run(...) formula to pass to your flow:

The table value I want to pass from app to flow looks like below:

5.JPG

The app's configuration as below:

6.JPG

 

More details about the JSON function in PowerApps, please check the following article:

JSON function

 

Please also check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Capture-Image-and-Save-as-Attachment/m-p/360072

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks, that one helped 😄

MrAutomatey
Frequent Visitor

I have found some information about this : "You will get errors if you start adding actions to the flow after you connect it to Power Apps. Therefore, you need to add all the connections/actions before adding the flow to your PowerApps button."

How to pass field values from a Canvas App to Power Automate(flow) – Part 1 – immersivecoder

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,864)