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 :
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!
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.
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.
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.
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?
David_MA
161
Super User 2025 Season 1
Michael E. Gernaey
148
Super User 2025 Season 1
stampcoin
143