web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 7H1AVgS/jR6lOpB41JL/Xi
Power Automate - Building Flows
Answered

Newbie Q - Name an output file with value from PowerApp or JSON var

Like (0) ShareShare
ReportReport
Posted on 7 Mar 2023 16:03:41 by 68

Hello,

New to PowerAutomate.  Found an article on how to take a Collection from PowerApps and output it as a CSV file in a SharePoint folder. (https://dk.devoteam.com/en/expert-view/guide-export-to-excel-button-in-powerapps/)

This works great.  However, it creates the file in SharePoint with a static name as specified in the "Create File" step.  When the flow is re-run, it fails because (I believe) the file already exists in the folder.  Ideally, I'd like to create the files in the SharePoint folder with unique names based on a value from PowerApps.  That value also exists in the JSON.

Just not sure how to pass that value from PowerApps along with the JSON, or how to extract it from the passed JSON.

Any help would be greatly appreciated.

Dpalmer_0-1678204968481.png

 

 

  • Dpalmer Profile Picture
    68 on 13 Mar 2023 at 22:03:08
    Re: Newbie Q - Name an output file with value from PowerApp or JSON var

    Thanks, nope I'm all good! Thank you

    David

  • v-bofeng-msft Profile Picture
    on 13 Mar 2023 at 02:16:53
    Re: Newbie Q - Name an output file with value from PowerApp or JSON var

    Hi @Dpalmer ,

     

    Is the problem solved? Do you still need any help?

     

    Best Regards,

    Bof

  • Verified answer
    Dpalmer Profile Picture
    68 on 12 Mar 2023 at 16:00:41
    Re: Newbie Q - Name an output file with value from PowerApp or JSON var

    Did research and found I could use this expression for the filename on the JSON Body to pull a single value from the first row of the JSON array:

    body('Parse_JSON')[0]['Id']

    I appreciate the help!

    David

  • Dpalmer Profile Picture
    68 on 10 Mar 2023 at 00:03:16
    Re: Newbie Q - Name an output file with value from PowerApp or JSON var

    Thanks Bof,

    That helps.  I was able to add a Parse JSON step. Issue now is, that I'm using the "Create File" step and when I add the JSON value to the filename, the Create File step then wants to do a For Each loop. The value I want is the same for all rows of the original collection.

    Thoughts?

  • v-bofeng-msft Profile Picture
    on 08 Mar 2023 at 02:51:12
    Re: Newbie Q - Name an output file with value from PowerApp or JSON var

    Hi @Dpalmer ,

     

    You could use parse JSON to parse the JSON string. I think this link will help you a lot:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Power-Apps-table-pass-data-to-Automate/td-p/669490

     

    Best Regards,
    Bof

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete