List Items to Todoist

On iOS I use Drafts to write lists of to-do items and then, via a Drafts action, create individual Todoist to-do items. I’m trying to replicate that functionality on macOS with KM via SimpleNote, TextEdit, and other text editors.

How can I take each item of a list of items in a text editor and create a Todoist task from each item? I have a sub-macro to create a Todoist task, so I could use that in a For Each action, I suppose, but I don’t know how to get the For Each to execute that sub-macro for each line item in the list.

Each of these…

  • List item
  • List item
  • List item
  • List item

…should result in a separate Todoist task.

Answered my own question by modifying JMichaelTX's MACRO: [FILE] Process Lines in Text File as below.

[FILE] Process Lines in Text File PSB TESTING.kmmacros (18 KB)

1 Like

I glad that macro was of some assistance to you. :smile:

One thought on your macro:

Instead of using a Named Clipboard to pass plain text, you could use the new KM8 Instance Variable (KM Wiki).You can set it in your main macro, and then use it in your sub-macro.

Better still, just pass the data as a parameter in the "Execute Macro" action:

And then in your sub-macro, just set a variable to %TriggerValue% to receive the parameter.

I like to avoid the use of clipboards, and especially named clipboards, as much as possible because they are slower and more subject to issues than just using KM Variables.

Questions?

1 Like