Have you got the latest version? After Effects CC 2018 is all about data driven animation.
Either way you can use external file to drive expressions (in older versions too) using the eval
javascript function. I explain it on my blog thus:
If you have a file that contains something like this:
var vals = {"rotation":8, "scaleX":150, "scaleY":200};
you can use this expression, e.g. in the scale property:
$.evalFile("/path/to/test.js"); // or "c:\path\to\test.js"
[eval(vals).scaleX, eval(vals).scaleY]
the first line reads the file and treats it as source for the expression, so vals is defined as an object with rotation, scaleX and scaleY properties, which we access as the value for our scale property.
In your case you'd be wanting to use the expression for the Source Text property, so your data file might be something like
var vals = {"comp1": {line1:"Doctor MCDoctorface", line2:"Surgeon"},
"comp2": {line1:"Skinner McHackett", line2:"Butcher}…
}
So that's an array of arrays, where each comp has 2 values, line1 and line2. In your expression you'd loop through the array, until you found the member of the outer array whose name matched thisComp.name
and then use the appropriate member for line 1 and 2.
To automate your rendering you can use the built-in command line renderer aerender (aka aerender.exe). With a bit of shell scripting you can automate the whole workflow.