It depends on how complex an automation framework you are working in.
If you want to use OpenVSP / VSPAERO in an isolated way, then you should look at automating OpenVSP / VSPAERO using the built-in scripting *.vspscript files.
If you are already working in a more sophisticated Python scripting environment, then you should use the Python scripting.
In either case, you need to prepare the geometry using the analysis tools capability of OpenVSP's API.
Check out the 'TestAnalysisVSPAERO.vspscript' example that is in the 'scripts' directory with the OpenVSP distribution.
Rob