I've made use of this [1] python script before for running some mail-merging type tasks with inkscape, so that could be a good starting point for anyone looking to do some fancy inkscape automation.
Personally I used it to combine generating mail merged print and laser cut patterns for the place cards. So you get a pdf to print out and a laser cutting SVG which can be 'lasered on' after the printing.