3

I am getting the list Item attachments using the Get Attachments action in the flow.

As the output, I have the JSON object which contains the information of attachments.

Now, I want to send this JSON to the Power Apps.

Respond to Power Apps action allows us to send only single items, not objects.

How can I achieve the above?

Note: Please suggest a way which does not contain the use of a premium connector.

2
  • I was able to achieve the similar requirement using "Response" action in Power automate (which is premium action). I think as of now there is no other way to achieve this and you have to use this premium action. let me know if this helps and If you want to use it I can explain more on this. Commented Jul 2, 2020 at 11:06
  • 1
    Thanks, I will let you know if I need help with Premium action Commented Jul 2, 2020 at 12:56

3 Answers 3

1

Solution 1 - Using Response action (Premium/Paid):

You can use Premium Response action to send complex data back to Power Apps from Power Automate.

Source: Respond from FLOW to Power Apps

Solution 2 - Respond to Power App action (Free but Complex):

You cannot directly pass JSON object to Power App from Power Automate. You can only pass String/Text value.

As a workaround you can send your JSON object to power app as a string by using a Join action in Power automate.

Then you need to parse that string to JSON using multiple Split functions and complex logic.

Check below link, it will help you to achieve what you want.

Respond Tabular Data from FLOW to PowerApps without Premium Response action


Update:

Power Apps now supports experimental ParseJSON function which might be helpful to you.

Check below links for detailed information:

  1. Power Fx: Introducing ParseJSON
  2. ParseJSON function in Power Apps (experimental)
3
  • Yes, I already tried this approach. It is a success but requires very complex logic based on your data structure. Commented Jul 10, 2020 at 4:46
  • Yes, true. it is free but you need to build complex logic. and yes, logic will change according to your data. Commented Jul 10, 2020 at 4:49
  • Yes, I've been somewhat "disturbed" and perturbed that Power Automate / Flow requires a Parse JSON step after retrieving JSON from HTTP SharePoint request. Further, that the Parse JSON requires a JSON Schema (which prevents the ability to have a flexible and dynamic Flow for a variety of Lists / use cases. Actually, it's fairly simple... check out my Answer below. Commented Jan 29 at 1:55
0

Using the Respond action this can be achieved and with help of formulas we can construct back to the collection again in PowerApps.

Follow below article for detailed information:

Send JSON to Canvas App from Flow

0

In many tutorials and responses to questions on how to return SharePoint or JSON data back to PowerApps, the use of Parse JSON step in Power Automate step after retrieving JSON from HTTP SharePoint request. Further, the Parse JSON requires a JSON Schema (which prevents the ability to have a single flexible and dynamic Flow that can be used for a variety of Lists / use cases).

Actually, it's fairly simple...

In Power Automate / Flow, create a new flow Simple SharePoint Get List Items Flow

add PowerApps V2 Step Identify inputs to Flow

Add Send HTTP Request to SharePoint step. I shortened the name of this step to simply "SendHTTP". Be sure to add "Accept" Header with value "application/json;odata=nometadata" simplifying the json response from SharePoint. Configure HTTP Request to SharePoint

Add "Respond to a PowerApp or Flow". SharePoint puts an array of results in the "value" parameter in JSON response. You can then put this data into a response field to send back to PowerApps. Use expression: string(body('SendRequest')?['value']) Configure Response Fields back to Powerapps

Now, in PowerApps, you can add (or refresh) your flow in the "Power Automate" section. And then in your App, you can interact with (or "Run") the flow. The R Set(var_input1, "https://yourcompany.sharepoint.com/sites/yoursite"); Set(var_input2, "67f0656e-473d-474a-882c-36fbae449a0b"); //GUID to your list Set(var_input3, "20"); //max number to return

Set(var_results, ParseJSON('HT-GetSPItemsMore'.Run(var_input1, var_input2, var_input3).data));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.