Thank you for the quick reply, it works fine now.
I notice that the workflow works with .txt files but not TP's standard .taskpaper files, is there any way I could change that somewhere in the script? I have a series of TP files I use in my daily work that I'd like to use.