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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Making an array log in...
Power Automate
Unanswered

Making an array log into csv format

(0) ShareShare
ReportReport
Posted on by 214

Hey all. 

 

I have a complex flow that sends emails to my firm's customers a few days after their statement has been mailed, reminding them of near due payments. 

 

I have this down to really crisp few minutes. See below

 

Power automate enviroment_payment due notifications.png

 

After the each for each action, an additional section is appended to a logging array. 

 

After the flow's completion this logging array is then save in a .txt format on a network drive. 

 

Currently the format that my logs are created in are below..... I would like to find a way to convert this into csv format so we can easily do reporting. Has anyone done anything similar. 

 

["first_name,last_name,Note Number,Product Number,email_address,Payment Amount Due,Billed Payment Due Date,Status","Alert,Alert,123456,nan,test@test.com,nan,nan, Skipped_Not_Correct_Date","Fred,Flinstone,666555444,nan,na@email.com,nan,nan, Skipped_Not_Correct_Date","Joan and Mary,Customer,123456,nan,email@gmail.com,nan,nan, Skipped_Not_Correct_Date","John,Smith,888777666,nan,info@email.com,nan,nan, Skipped_Not_Correct_Date","Joe,Customer,123456789,123.4,email@email.com,789.60,2023-10-01, Skipped_Not_Correct_Date","Fred,Flinstone,888777666,nan,email@email.com,nan,nan, Skipped_Not_Correct_Date","Joe and Mary,Customer,234567,nan,email@gmail.com,nan,nan, Skipped_Not_Correct_Date","Jonny,Appleseed,3456789,nan,email@gmail.com,nan,nan, Skipped_Not_Correct_Date","Buggs,Bunny,123456789,nan,email@email.com,nan,nan, Skipped_Not_Correct_Date","Buggs,Bunny,3456789,nan,email@email.com,nan,nan, Skipped_Not_Correct_Date","Donald,Duck,987654321,12345.0,email@gmail.com,123.12,2023-10-01, Skipped_Not_Correct_Date","Barney,Rubble,123456789,123.10,email@email.com,208.24,2023-07-27, Skipped_Not_Correct_Date","Porky,Pigg,456789,nan,piggy@email.com,nan,nan, Skipped_Not_Correct_Date","Porky,Pigg,56789,nan,piggy@email.com,nan,nan, Success_Email_Sent"]

 

 

 

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    lbendlin_0-1697054519523.png

     

  • mcnemare1 Profile Picture
    214 on at

    @lbendlin 

     

    Invalid, Am I using the correct formatting for replace()?

     

    power auotmate enviroment invalid expression.JPG

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at
    replace(item(),'"','') single quote - double quote - single quote, not two double quotes.
  • Verified answer
    Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    The cleanest way: Don't append strings to your log array but objects.

     

    If this is not possivble, use a Select action to restructure your array of strings to an array of objects,

    then use the action "Create CSV table":

    Chriddle_0-1697102203118.png

    Select From:

    skip(outputs('Data'), 1)

    Select first_name:

    split(item(), ',')[0]

    Select last_name:

     

    split(item(), ',')[1]

     

    Select Note Number:

     

    split(item(), ',')[2]

    and so on.

     

     

  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    The shortest way is to join the array of strings with new line:

    Chriddle_0-1697103064622.png

    Compose expression:

    join(outputs('Data'), decodeUriComponent('%0A'))

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard