Shortcut how to find items with tags which are variables

I am trying to make a shortcut, in which I select a contact and use the firstname as variable. Next I try to find Items with two tags (one is fixed and the other is the variable). I cannot find a solution. See below what I have which is not working, any help is appreciated:

Do you have a Tag/s whose title contains such a long string ? I mean, from your screenshot, I see the Tag/s you are requesting should contain _c1b. 3km - goals I want other to achieve, …

In this case yes. I have now tested with short names and still not working, same error “communication problem with application”

This is a shortcut I use to add birthdays to OF. Perhaps you can use this to find a solution.

@bkruisdijk Your shortcut doesn’t work because the ‘Find Tags’ action returns the tags which contain the single string provided as input. It doesn’t parse your input text which contains the comma to perform multiple searches.

Instead, you can use the construction in the screenshot. Replace ‘TagX’ and ‘TagY’ by your variable or hard-coded tag names. It works as follows:

  1. The text gets converted to a dictionary of multiple strings.
  2. The ‘Repeat with Each’ block gets the tag object for each string in the dictionary. Its result is a dictionary of OF tag objects.
  3. The dictionary of tag objects is used as the tags parameter of the OF ‘Find Items’ action. You’ll need to tap ‘Choose’ and then ‘Magic variable’ at the bottom of the list of tags to select it.

I can think of one more potential difficulty. Since you are using the ‘All of’ tags option, you need to ensure that you are getting just one tag object for your variable with the contact’s first name. For example, if you select ‘Mary’ and OF contains tags for both ‘Mary’ and ‘Maryanne’, the ‘Find Items’ search will include both and not return the same results. To manage this you could present a menu (inside the Repeat block) to pick the right tag in case there are multiple tags returned by ‘Find Tags’.

Thank you very much for the response.

I think I do understand your idea/ concept. I have build the shortcut but unfortunately I get the same error message “Find items cannot be executed, a communication problem with the app occurred”.

Is it working for you? Or do I have another problem?

Very nice shortcut you have build! I will use it with your credits!

Unfortunately it does not use the “Find items in OmniFocus” where I have the problem I cannot use two variables in Tag section to find items.

But your response is appreciated!

It works for me and I’ve never seen the error message you mentioned. I suggest you contact the excellent Omni support team to diagnose your problem.

Thanks. I have contacted the support humans!