Retrieve list of tasks with Shortcuts app


#1

I am looking for an automated way to retrieve a list of tasks from a certain perspective in Omnifocus 3 for iOS.

Omnifocus on iOS has great integration with Shortcuts (nee Workflow) for inputting tasks, but nothing much for retrieving them. I am in the process of creating a Shortcut that will compile a list of information about my upcoming day (including a weather report, upcoming calendar events, etc) and display that info in a single pdf document. What I am looking for is a way to have Workflow pull all of the tasks from a perspective called “Work” (which has shows me all tasks from within certain projects that are either due soon or flagged).

Does this exist? I can’t find any automated way to retrieve a list of tasks from Omnifocus on iOS period, but maybe I’m missing some function that is available through x-callback or similar. If not, anybody aware of a workaround?

Apologies if this is a repeat, but I didn’t see any recent posts discussing this topic.Thanks!


#2

As far as I can tell, there’s no way to get tasks out of Omnifocus on iOS without using the share button to copy tasks.

I would really like a way to do this, as well as a way to mark tasks complete without having to interact with the UI.


#3

Agreed and when you share action groups or projects in general, they don’t include the whole list of included actions. That seems like a glaring ommision.


#4

I recently built one that I trigger by Siri after using multiselect and copy, which starts by asking for input and I paste in the tasks (Shortcuts seems to only grab the URL of the tasks if I use a Get Clipboard action).

It combines the actions with a flat text readout of my calendar events into a note in Agenda. Maybe this might help?

https://www.icloud.com/shortcuts/bfbc3c1d6d284d3fb11917bbe4126c73

ScottyJ


#5

Hi there,

The Fantastical workflow might help? I don’t really understand it, but it seems to take a task out of Omnifocus and add it to Fantastical, so in theory it should be able to do that for a group of tasks? I would also like this, similar to the OP and have the list of tasks from custom perspective emailed to my self (together with my calendar events). I think I may have seen a Siri shortcut workflow to export projects to Agenda, but I’m not sure…

Here’s the link to the Fantastical workflow:

Scroll down to the samples…


#6

I tried using your shortcut, but nothing happened in Agenda. It just opened up to my “On the Agenda” view. Does the shortcut still work for you?


#7

Hi @scrollsgeek! I had a closer look, and a few things stand out about how I built this:

  1. It needs access to your calendar
  2. (And this is most likely the issue here) The Agenda URL expects a project called “Journal” to post a note to (projects can’t be created by URL scheme).

This can be fixed by either creating a project in Agenda called Journal or editing the URL (second last step in the Shortcut) to change the project-title= attribute to the name of the project you’d like to use (make sure the project title’s name is URL-encoded here, like having %20 for spaces, etc.).

Hope this helps!

ScottyJ


#8

Thanks @heyscottyj —I had a category named “journal” but no specific project called “journal.” Thanks for the tip. This shortcut is just what I needed for my daily review.

Btw, I really appreciate your meeting processor shortcut. It is really useful for dissertation committee meetings.

Warm regards


#9

I’m glad these are helpful!

There are a few versions of the Meeting Processor, so I’m going to do a blog post on the latest (and probably last for awhile) version, which cross-links Agenda and OF content. Currently this is tagged with Backlog in my OF 😂

Cheers,

ScottyJ


#10

Oh good—I look forward to your next blog post once it escapes the backlog zone. I’m using the version from the February post on learnomnifocus.com. I was just tinkering around with getting it to work with the email app Spark on my coffee break today.

Michael