Help in saving an updated Draft to a file

I am using the Monthly Journal to create a journal. However, rather than save my entries in Drafts I would like to save them in a folder in iCloud Drive. Currently I wait until the end of each month and then run an action to save the Draft containing the last month’s entries to a file in iCloud Drive. However, I would prefer that each time I made an entry that it is saved direct to a file, and I cannot work out how to do this?

If it is just a string of entries I could just create an action using the File step to just append the entry to a file. However, the first line of the file has the Month title, and so I am using the script in the action above to create the running draft, but I get stuck on saving the updated draft to a file.

The “Append to iCloud Journal” action (in the default “Basic” action group, or install from link below), is that. There are also examples in the directory for doing the same to Dropbox, OneDrive, Google Drive, etc.

Thank you. I already had this action installed, but by linking to it you have made me aware of some editing to it that I had done in the past so that it would not quite do what I wanted. I have now reinstalled it to its original state.

However, the one thing that I cannot get it to do is when it first creates a new file for a new month, the first line of that file is a title, for example - August 2022 - Monthly Journal.