cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Carlchen2010
Frequent Visitor

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 @Carlchen2010 ,

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-Attachmen...

 

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 III
Dual Super User III

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.

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

 

Create_Array.png

Pstork1
Dual Super User III
Dual Super User III

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.

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

Pstork1
Dual Super User III
Dual Super User III

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 @Carlchen2010 ,

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-Attachmen...

 

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

Thanks, that one helped 😄

MrAutomatey
Regular 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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,282)