Yup, there's lots of threads about this stuff already (good info here too:
viewtopic.php?f=8&t=1959)
Probably going to look something like: {REPLACE "; layer 2," "M117 Text\n; layer 2,"}
That puts M117 command right at the end of the first layer (before starting the 2nd layer)