You can forget about ChatGPT writing code or Automator workflows for you.
Only Pages can create new documents from its templates, and save them. That means you would need a Run AppleScript Automator action that communicates with Pages using Pages-specific AppleScript scripting dictionary reserved words.
Here is an example Automator workflow that uses the UNIX strftime codes to format a date string as YYYYmmdd-HHMM that would be appended as a filename string component.
Then, it prompts you for the base filename (e.g. foo). The script assumes this will be written to the Desktop. Other filesystem locations would require more advanced code to prompt you for the destination folder.
Next, it launches the Pages application, and using the constructed output filename, it makes a new blank file based on the "Blank" template and then saves that file.
The only action you need in an Automator workflow is a Utilities Library > Run AppleScript. You select and replace the boilerplate text in that action and replace it with the following code that has been tested with Automator (as an application) on macOS Sequoia v15.0.1. It should work fine on Ventura 13.7. Once you have copied/pasted the following code into the Run AppleScript action, click the hammer icon to compile it.
use scripting additions
on run {input, parameters}
-- YYYYmmdd-hhmm where %H is 24-hour time (0 - 23) or %I is 12-hour time
-- if this is run more than once per minute, then you will produce the same
-- document with a -n appended to it. To avoid that duplication issue, one
-- can add seconds to the dateFMT as "+-%Y%m%d-%H%M%S"
set dateFMT to "+-%Y%m%d-%H%M"
set dateStr to (do shell script "date -j " & dateFMT) as text
try
set thisDoc to text returned of (display dialog "Enter basename of Pages document:" default answer "") as text
on error
return
end try
if thisDoc = "" then return
set newDoc to (path to desktop as text) & thisDoc & dateStr & ".pages"
tell application "Pages" to if it is running then quit
delay 1
tell application "Pages"
launch
set newFile to (make new document with properties {name:newDoc, document template:template "Blank"})
with timeout of 60 seconds
close newFile saving yes saving in file newDoc
end timeout
end tell
tell application "Pages" to if it is running then quit
-- by default Pages hides the filename extension in the Finder
-- this will reveal it
tell application "Finder"
if exists (newDoc) then
set extension hidden of (item newDoc as alias) to false
else
return
end if
end tell
return
end run
When it prompts me for a filename, I enter foo, and the foo-20241012-1019.pages document is written to the Desktop.