How should i create csv file with saved search results
Reformat your search results as an array of JSON then use papaparse library to “unparse” that to CSV.
You can use the N/Task module, which has an API (searchTask?) that lets you specify a Saved Search and a file cabinet location. It will run the search and save the results as a CSV.
You can call it from a Scheduled script, for instance.



