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

How to save an output from a Flow to a file

I am having problems trying to save JSON output from an HTTP request to a web service, into a file using Microsoft Flow.  I tried using Create File on Azure File Storage and keep getting this error:

 

Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '2528': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_azurefile']['connectionId']' cannot be evaluated because property 'shared_azurefile' doesn't exist, available properties are ''. Please see https://aka.ms/logicexpressions for usage details.'.

 

What does this mean and how to solve?

1 ACCEPTED SOLUTION

Accepted Solutions
gadgetman4u
Frequent Visitor

So I found out that I got this working by using the entered inputs when doing the test.  You can't use the data from the previous runs.  

 

For testing from the PowerApp, make sure that the flow is attached to the specific button to trigger that flow.  I found out from this article http://www.cleverworkarounds.com/2017/06/27/a-filename-generation-example-for-powerapps-with-flow/co... that I had to disconnect my flow from the PowerApp and then reconnect it in order to get the flow working.  

 

Also, if you can't attach the flow to the button in the PowerApp, check the data source:

 

Instead of removing the flow under:

Actions-->Flows-->...-->Delete From App

 

The new process is:

View-->Data Sources-->...-->Remove

 

Then add back to app as normal.

 

I got this from digging this discussion https://powerusers.microsoft.com/t5/General-Discussion/Flows-and-PowerApps/td-p/23496, after searching for a while.

 

Hope this helps others avoid the frustrations that I had just doing this task of saving a file in the flow.

View solution in original post

1 REPLY 1
gadgetman4u
Frequent Visitor

So I found out that I got this working by using the entered inputs when doing the test.  You can't use the data from the previous runs.  

 

For testing from the PowerApp, make sure that the flow is attached to the specific button to trigger that flow.  I found out from this article http://www.cleverworkarounds.com/2017/06/27/a-filename-generation-example-for-powerapps-with-flow/co... that I had to disconnect my flow from the PowerApp and then reconnect it in order to get the flow working.  

 

Also, if you can't attach the flow to the button in the PowerApp, check the data source:

 

Instead of removing the flow under:

Actions-->Flows-->...-->Delete From App

 

The new process is:

View-->Data Sources-->...-->Remove

 

Then add back to app as normal.

 

I got this from digging this discussion https://powerusers.microsoft.com/t5/General-Discussion/Flows-and-PowerApps/td-p/23496, after searching for a while.

 

Hope this helps others avoid the frustrations that I had just doing this task of saving a file in the flow.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,875)