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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Combining txt files in...
Power Automate
Answered

Combining txt files into one text file from an Array in Power Automate.

(0) ShareShare
ReportReport
Posted on by 47

Hello!

 

Thank you all so much for reading this!

 

I've struggled with Googling this problem, I don't want to use a 3rd party power automate library to do this.

 

I've noticed that I'm seeing a lot of help for merging into PDF and merging WORD documents on google.

Which is frustrating for me as I only want to combine text files! 

 

I guess because no one uses text files anymore? It shouldn't be too complicated ? I'm overcomplicating this?

 

I have an array within my power automate flow which contains text files like so :

 

array.png

APPEND TO ARRAY VARIABLE

 

NAME : FILE ARRAY

VALIE : {
"source_file_content": @{body('Get_file_content')}
}

 

How can I merge the array text files together and save them as one text file?

 

Many thanks for your help!

Categories:
I have the same question (0)
  • Tomac Profile Picture
    4,086 Moderator on at

    Hi! I need a bit more information about your goal to assist. Are you looking to store the text file in SharePoint/OneDrive or are you looking to have a single array with the text files for use in your Flow?

  • SuperDude123 Profile Picture
    47 on at

    Hello Tomac and thanks for the reply.

    So the files I am merging are in a sharepoint site folder.

    I wish to merge all the text files together in date order. Each file is one month of logs.

    So there will be will be files named as follows.

    2024-01.txt

    2024-02.txt

    2024-03.txt

    I have another document folder in Sharepoint which I will drop the merged file to.

    So far my flow looks like this. I trigger saving the monthly log file via an email. This saves the file to document library in sharepoint.

    Flow1.pngFlow2.png

  • Verified answer
    SuperDude123 Profile Picture
    47 on at

    https://powerusers.microsoft.com/t5/Building-Flows/Combine-CSV-Files-in-SharePoint-Folder-Into-One-Master-File/td-p/1430267

     

    I am currently looking at this to see if it can be adapted to my needs. I think the problem is that when I google for solution, all examples show a fixed array length. As you readers will know already that the array could be of any length depending on the number of files within the sharepoint document folder.

     

    I will experiment with this link above and see if I can make sense of implementing this into a loop.

  • SuperDude123 Profile Picture
    47 on at

    The above link helped me to solve my problem so I have marked as solution. Hopefully this will help other users. Please go ahead and take time to view the above link.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard