I am looking to write script in either Python on JavaScript that executes an SQL file query and then saves the results in a CSV file. Bonus points if I can also make it time-bound to run at a specific time.
I have tried looking at the IDE Scripting Console but I can't find any relevant documentation to actually running JavaScript or Python even though it says it's possible.
I'm also open to doing it using the HTTP client and send the query result using a post request.
Anything that can automate the manual labor of clicking through the UI would be hugely appreciated.