Find Items in OmniFocus Shortcuts Action

I’m trying to create a shortcut that takes in a list that I can select an item from. The selected item is then converted into a Dictionary which is in turn converted into an OmniFocus database object. This database object is a Tag. I then want to use this tag in the action Find Remaining Items. When I send the database object to the action it returns nothing. however, if I replace the Tags filter with the tag I want i get results. I MUST be doing something wrong but I can’t, for the life of me, figure out what I’m missing.

Any suggestions, or ideas on what I’m doing wrong?

Can you share your Shortcut? It’s much easier to diagnose an issue and test when there is the actual shortcut to work with.

Just take anything sensitive out of it.

A couple of things to note here…

  • I think you need to use the actual primary key of the database object, not the tag name. The only way I’m aware of to get this for an OF tag on iOS is to use OmniJS (which can be enabled on OF, but I don’t believe is yet formally released for it).

  • I think the Find Remaining Items action isn’t as a robust as you’d like it to be at the moment. For me it sometimes gets to the point where it’s only returning a subset of the data it should (or none at all) and I have to restart some combination of OF, Shortcuts or the device to get it working properly again. I believe Omni have improvements in the works for this whole area.

That being said, I managed to get the Shortcut below to return the data for a tag that I’d used OmniJS to get the key for.

:man_facepalming:t2: … it never occurred to me that the PrimaryKey was the ACTUAL primary key of the tag. I’m going to give that a try.


Roger, how did you get the tag primary key using OmniJS. I’m struggling to find anything on how to even get started. Is there a tutorial you can point me to?

Found a way to get the Primary Key by copying from OF as a link and getting it that way. Tested and it does what i need it to do.

Thanks Roger for pushing me in the right direction!

Glad you got it working.

Interested in how you managed to copy the link for a tag from OF.

Did you do this on iOS or the Mac ?

I can see how to get a link to a task on iOS using the share button, but the same option didn’t seem to be available for a tag or project.

Also if you did want to look into OmniJS as some point then the link is…

Figured it out.

Just dragged and dropped the tag into Yoink and it showed the link.