Hi Nick, could you please elaborate? Do you need this script to run on top of GoodData Platform? Please note that you have posted your question to the GoodData Platform channel, but if you have rathe using GoodData Cloud, I would advise moving your question to this other channel so it grabs the correct attention.
Assuming you are using our legacy Product, running custom scripts on our Platform is not allowed due to security reasons, but you should be able to add the insight to your app via the
GoodData UI and customize the export as needed. For example, this is the API for exporting an insight:
API Reference | GoodData Platform Enterprise