Jump to content

Option to make Workflow result appear in the default search or fallback


Recommended Posts

Hello,

 

i have a few workflows that i would like to use in the "default" search without using any specific keyword.

 

The idea would be to add an option on workflows to allow them to be automatically triggered when we search a query without using any keyword (just like Applications, or Folders or Safari Bookmarks defined in the settings of Alfred)

 

Thanks

Link to post
Share on other sites

I want fallback results that link to any input object. If the script filter were automagically called when nothing else matched, I might mistake it for normal results. If, however, there was a fallback option which connected to a script filter, it would still be clear that the choices are fallback results.

 

Here's a mockup to explain what I mean:

Image%202014-06-08%20at%208.08.59%20AM.p

 

Mind that the connection between a Fallback Search and a Script Filter is not possible; if the above feature was added, it would be possible.

Image%202014-06-08%20at%208.12.41%20AM.p

Link to post
Share on other sites
  • 6 years later...

I wanted to add a comment in support of this feature.

 

I wrote a workflow that returns folders and files that I often access, and having to remember to use the workflow keyword is difficult, and I would rather have the results of that workflow just be in the default results.

 

I've read a few other places in the forms where it's been mentioned that it isn't possible to add workflow results to the default search results because it could slow down the default results.

 

A few remarks:

 

1. There are slow workflows that could slow down the search results, but there are many workflows that would be useful to include in the default search results that are very fast, and wouldn't slow down the results at all. I added a workflow that returns commonly used folders and files, and it takes less than 1/100th of a second to run.

 

2. The risk can easily be remedied by including a warning that adding a workflow could make the default search results slower, so that users can be aware of the risk and decide whether or not it's worth it for them.

 

3. Workflows can be run asynchronously, in another thread, and so wouldn't have to slow down the main search results.

 

4. This feature has been requested a number of times, aside from this thread, so it seems that it's a common desire:

 

 

Link to post
Share on other sites
8 hours ago, rodarmor said:

The risk can easily be remedied by including a warning that adding a workflow could make the default search results slower, so that users can be aware of the risk and decide whether or not it's worth it for them.

 

Warnings don't work, unfortunately. People still do whatever it is you warned them not to, and then complain or ask for support when it works poorly like they were warned it would.

 

9 hours ago, rodarmor said:

Workflows can be run asynchronously, in another thread, and so wouldn't have to slow down the main search results

 

Alfred already runs everything concurrently. That's one of the potential problems.

 

Alfred runs every workflow script in a new process, so setting a whole bunch of workflows to be run every time Alfred performs a search is a great way to drive your computer to its knees. Especially since some of Apple's new security crap they added in Catalina grinds to a halt when you try to start a lot of new processes quickly :(

 

The other problem is that with searches running concurrently, Alfred's search results tend to jump around until all the searches have finished and their results been merged together. Like you say, fast-running workflows won't degrade that experience noticeably. But a lot of workflows aren't fast. They may take tenths of a second to run, or much longer on first run while they pull in some data from somewhere else.

 

Worst of all, a workflow might start fetching data from an app that isn't running via AppleScript, meaning the app gets unexpectedly launched, takes focus and makes Alfred disappear while you're still searching.

 

That all makes being able to add any old workflow to the default results quite a footgun.

 

I suspect that adding your own stuff to the default results might have to come in a more limited form, like List Filters only, or only Script Filters with "Alfred filters results" set, and Alfred makes no guarantees about updating its cached set of your workflow's results.

Link to post
Share on other sites

@rodarmor Taking a look at @deanishe's response, he's covered quite thoroughly why workflows in default results isn't a very good solution, and warnings are never enough.

 

Having said that, just in case you hadn't spotted it, did you see that you can add your workflow with a workflow trigger as a fallback search result? 

 

https://www.alfredapp.com/help/workflows/triggers/fallback-search/

 

While it's not the same as including workflow results into your default results, it's a great way to bounce over to your workflow if you forgot to prefix your search with the workflow keyword or hotkey combo. :)

 

Cheers,
Vero

Link to post
Share on other sites

 

20 hours ago, deanishe said:

Alfred runs every workflow script in a new process, so setting a whole bunch of workflows to be run every time Alfred performs a search is a great way to drive your computer to its knees. Especially since some of Apple's new security crap they added in Catalina grinds to a halt when you try to start a lot of new processes quickly :(

 

 

If there's a hard limit on the number of processes that can be run, then this could be rate limited.

 

20 hours ago, deanishe said:

Warnings don't work, unfortunately. People still do whatever it is you warned them not to, and then complain or ask for support when it works poorly like they were warned it would.

 

 

This is a good point. However:

- Many people have requested this feature
- It's an extremely powerful and useful feature that makes Alfred much more customizable
- It's a feature for which there aren't really good substitutes
- The gotchas are easy to understand and avoid. (Don't add too many workflows, don't add slow workflows.)

 

I think, on balance, it's worth adding, even with the risk that it will be misused.

 

20 hours ago, deanishe said:

I suspect that adding your own stuff to the default results might have to come in a more limited form, like List Filters only, or only Script Filters with "Alfred filters results" set, and Alfred makes no guarantees about updating its cached set of your workflow's results.

 

I want to add a script filter with "Alfred filters results" to my default search results, so this would work for my use case. So for me, this would be a great compromise.

 

19 hours ago, Vero said:

While it's not the same as including workflow results into your default results, it's a great way to bounce over to your workflow if you forgot to prefix your search with the workflow keyword or hotkey combo. :)

 

 

Thanks for the suggestion! I'm not sure this works for me. The workflow that I'd like to add just returns a bunch of local files and folders, as opposed to something like a google or dictionary query. I might be missing something though!

Link to post
Share on other sites
2 hours ago, rodarmor said:

The gotchas are easy to understand and avoid. (Don't add too many workflows, don't add slow workflows.)

 

Doesn't matter, I'm afraid. People will still add too many workflows and they will still add slow workflows, and then they'll write Vero an email asking why it doesn't work.

 

2 hours ago, rodarmor said:

I think, on balance, it's worth adding, even with the risk that it will be misused.

 

I'm sorry, there isn't really a balance to be struck. For a feature to be considered, the risk of misuse or misbehaviour must be basically zero.

 

The Alfred team just doesn't have the capacity to be fielding an extra bunch of support requests, and you can't make trade-offs when you've nothing to trade with.

Edited by deanishe
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...