Keynote, Combine slides

Hi,

I want an AppleScript that given a list of keynotes, can convert them to 1 pdf file and then combine them to 1 file, or combine the keynotes to one file and then convert them to 1 pdf file.
I am new to AppleScript (not to other languages), learning by book and examples. So far, I am able to combine a list of pdf files to 1, using a “repeat with i in” construction, but still struggling with the keynote part: only the first file is processed.

Note: The automator actions from https://iworkautomation.com contains a convert to pdf action, same problem here, only the first file is converted.

thanks a lot !
Frederik