Help to get a CSV/Draft export of items of the same Magic Variable:

Dear friends:

I am having problems in managing the text Variables in shortcuts (maybe due to my poor commandment of shortcuts, so apologies in advance)

Use case is always the same:

  • I retrieve a variable (ex: items in Omnifocus, or Workouts using #toolbar
  • and i want to export a line per event with some variable details (name, url, due date, estimated minutes, name for example) those as a text file to Drafts or any other source
  • If I run the shortcut only once, it does work and I get the expected outcome
    (one line with those elements) what we want, but when I apply the shorcuts to multiple events/dates, then the file/draft appears disordered.

The draft note shows first all names, then all urls, and finally all due dates and estimated minutes …

can anyone help me in structuring my query to have the desired input? I assume it is a lack of programming skills so apologies in advance

I am trying to get the same result in 2 shourcuts (OOF Items and Health Events ) … Omnifocus screenshot as an example

Expected Outcome

16 Questions for Selling in COVID-19, omnifocus:///task/aHy5zpGYbgU, 30
Revisar Stategic Presentation (looking for MIssion and Strategic Priorities, omnifocus:///task/nT7YHz5rJb2, 30
finish reviewing battle cards (commvault, sophos, mcafee), omnifocus:///task/htkQfQ6i1YW, 45
Propose a accountability methodology for Account Plans // Opportunities, omnifocus:///task/a54LRENz66x, 30

vs Actual Outcome

16 Questions for Selling in COVID-19
Revisar Stategic Presentation (looking for MIssion and Strategic Priorities)
finish reviewing battle cards (commvault, sophos, mcafee)
Propose a accountability methodology for Account Plans // Opportunities omnifocus:///task/aHy5zpGYbgU
omnifocus:///task/a54LRENz66x 30

as you can see the shortcut is reading every name first, and then moving to every url to finish with every estimated minutes, despite the declaration of variable

thanks in advance


In your repeat with each item block you have a text block. In that text use the repeat item variable instead of the OF list variable. You can access the specific attributes you want for that repeat item just like you would the OF one itself.

Thanks @slymer for the response. Unfortunately the output is exactly the same… first Draft is compiling the first attribute line by line, then the second and finally the third…

again a screenshot to show

any other hint?? thanks in advance

It worked fine for me except I had to save the repeat item to a separate variable as the repeat item variable when set to type item wouldn’t show me the full properties list after the first use. :man_shrugging:t2:

Here’s my test shortcut that gave me just the one set (limited to 25 on the find) of item details appended to my test draft.

it does work
I believe that setting the variable every time as you suggested did work (and it was a brilliant piece of guessing) … I would provide you with more colour once I could consolidate… but you made my day

Not a guess, just logical :nerd_face::joy:

Glad it works for you.