The process of creating a file in Indesign. Can that be executed through commands with out going through the Indesign interface.
I think you need to tell us a lot more about what you are trying to do before we can provide an intelligent answer.
If you've got the needs and the bucks: InDesign Server.
Automated publishing software | Adobe InDesign CS6 Server
If you want to automate what you do within InDesign, learn scripting.
Retrieving data ...