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.
Thanks, nope I'm all good! Thank you
David
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
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?
Hi @Dpalmer ,
You could use parse JSON to parse the JSON string. I think this link will help you a lot:
Best Regards,
Bof
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2