Hi All,
I need some pointers on how to format data I am receiving from an API call, so that it can be piped out into an external CSV file.
The inbound data has been parsed, created as a CSV table and then appended into an Array and looks like this:
After all the records have been processed via the API call my array looks like this:
Each "ID,CID,Current_IP…” line being the result of one iteration of the Apply to Each API call.
The end result of this workflow gives me this CSV:
Which is clearly not in a usable format, but at least it’s piped out the raw information.
How do I get the information formatted like:
ID,CID,Current_IP
nff7f3367cc394513937c5c253f63d57a,CID_123,192.168.0.1
abc3456430adior,CID_456,192.168.100.100
I suspect it's something to do with the /r that have been inserted? This is my first workflow, and I'm pretty sure there are many ways to streamline the process, so guidance is appreciated!
Thanks
We have finally got there! Thank you so much for your time and perseverance with this Ellis 😃👍
Now I can continue on building the content of the report, you've helped me a great deal!
Thanks for the screenshots and for posting the error messages. I've created an example flow, though not exactly the same as yours the same concepts and actions should produce the CSV file.
For this flow, do not use the Select action, instead construct the a JSON item in the Append to Array action as shown below:
Example output:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
I get the same error, which was why I had the create CSV prior to the append Array:
Try the following modifications:
Move the Create CSV table action OUTSIDE of the Apply to each loop.
Similar to what I suggested in the following flow chart:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Sorry, I meant could you please share screenshots of the flow.
Ellis
Can you please share the flow as I'm not clear on the steps why you are creating a CSV file then appending the content of the CSV action to an array.
I'm using the Array as a means of collating all of the outputs from individual API calls, and then the idea was to pipe out all the information into an external file - as oppose to doing a File append after each iteration (which had it's own issues).
But given how new I am to this, I expect there are lots of room for improvement in my flow.
I couldn't share my Flow directly, but I have done an Export of it (after sanitising credentials, etc).
Your time and help is much appreciated!
Can you please share the flow as I'm not clear on the steps why you are creating a CSV file then appending the content of the CSV action to an array.
I'm guessing, but is logic of the flow similar to this:
You could try :
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi Ellis,
Thanks for the suggestion and it feels like I'm a step closer.
During the Create CSV Table stage I just left it configured as the "Output" of the "Select" step, which resulted in a table full of "\r\n"
Then I amended the fields in the "Create CSV table" step so I'm explicitly specifying the properties
Which yields the same results as before. My "Compose" step performs two functions for me, one is to validate the contents of it and also as a means to use it to populate the "Create File" step, as my ReportBuffer Array cannot be specified for the the File Create?
You want to do something similar to this :
The details of the Select action will depend on output of the API call.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1