iWork 06's Pages 2 applescripting.

Heya there,

I’m trying to build an automated invoicing app, my workflow produced a bare bones pdf file from my filemaker database,
and I’m currently adding it by hand to my Pages template letterhead.

I’m trying to glue all of that with a little applescript,
but i’m having trouble using Pages’s dictionnary.

here is what I would like to do:

“Create new document using template xxxx”
“Replace text block yyy of page 1 with text from ‘display dialog’ box”
“Replace text block zzz of page 1 with text from ‘display dialog’ box”
“Replace image ttt of page 2 with pdf file”
“Print as compressed pdf”

any wizard here could give me pointers ?
the applescript library should explain everything, but I can’t get a hang of the stuff…

Thanx to all in advance !