How to import CSV from remote API?

Edit: Currently using the array fields directly, so low priority issue


I’m using API Action to download a CSV file from a remote API. It’s downloaded as a text string, how do I use the Import CSV step with a CSV that isn’t present on the file-system? Or how do I save the file to filesystem so I can then use Import CSV? I think Wappler doesn’t support this yet?

Thanks for any advice! This is NodeJS.

Edit: Previously I’ve attempted to split the string at \n to get an array of lines, and then at “,” to get an array of the individual fields. Is there a way I can create an object with the fields inside? I’ve attempted to use “Set Value”, but I couldn’t get to the point of building the object (typing a JSON object in the data expression threw a syntax error or something), see screenshot below. I’ve ended up deleting those steps mistakenly :frowning:

The goal of creating the object is just so I have some sort of type-safety, instead of going around with array[3] around the script

(forgot to .split(",") to get the individual fields, don’t mind that)

Community Page
Last updated: