Help pasting a list of subtasks into a template task

If I am working in a normal task, click “Add subtask”, and paste a newline-delineated list of subtasks, it will generate a new subtask for each line in my text. This is great!

However if I attempt to do the same thing within the “Edit” screen of a template, I simply get a single subtask with all of my text pasted into it.

This would be incredibly helpful to be able to do the same thing within my template. Am I missing how I could add a long list of subtasks to a template task in one command?

Welcome, @Jamie_Clark1,

You’re not missing anything!

I’ve moved your post to Product Feedback so you can now vote by clicking the purple vote button at the top, like I just did!

Thanks,

Larry

2 Likes

If it helps anyone else, I used Alfred to create a Workflow that reads from a text file and types each line, pressing “Enter” after each line. I was able to get 150+ subtasks entered into my template this way:

on alfred_script(q)

-- Get the name of the frontmost application
tell application "System Events"
    set frontmostApp to name of first application process whose frontmost is true
end tell

-- Ask the user to choose a text file
set filePath to choose file with prompt "Choose a text file:"

-- Read the contents of the selected file
set fileContents to read filePath as «class utf8»

-- Split the contents into separate lines
set textItems to paragraphs of fileContents

-- Iterate through each line and send a System Command to output it followed by hitting the Enter key
repeat with i from 1 to count of textItems
	set currentLine to item i of textItems
    do shell script "echo " & quoted form of currentLine & " ; sleep 0.1 && printf '\\r'"
    
    -- Simulate typing and pressing Enter in the focused window
    tell application frontmostApp to activate
    delay 0.1 -- adjust the delay if necessary
    tell application "System Events" to keystroke currentLine & return
end repeat
end alfred_script
1 Like