Jump to content

Allow workflows to get results from other workflows

Recommended Posts

A feature I think could be an enormous boon to Alfred's functionality without massively expanding its scope would be the ability for workflows to call other workflows via Alfred's AppleScript API, but with the results returned to the workflow, not Alfred.

With a single addition to Alfred's AppleScript dictionary, say, tell Alfred to search "query" and return results (or however these things work), the (XML/arg) results from one workflow/Script Filter could be returned to another.

This would allow workflow devs to chain Script Filters together—something that could massively simplify workflow development—without requiring a significant overhaul of Alfred's API/workflow model.

Currently, workflow authors have to jump through a lot of hoops to implement multi-stage workflows, usually with the undesirable "flash" of a disappearing and reappearing Alfred window.

For example, my FuzzyFolders workflow has to use multiple keywords and delimiters to coax Alfred into performing a multi-step action. It would be much cleaner for the user and much easier for me (the developer) if I could tell Alfred to perform an action but return the result(s) right back to my script instead of passing it/them off to another action.

Many workflow authors resort to AppleScript dialogs and tools like Pashua/cocoaDialog to solve this problem, which (1) kind of wrecks the Alfred aesthetic/workflow and (2) results in a dozen copies of the same helper app wasting space in users' Dropboxes.

Link to comment
Share on other sites

  • 4 weeks later...



Especially the part about using Applescript dialogs and the flashing.


This would replace the need for two items I asked for a couple of years ago:


  1. An input workflow module that could be used to pick up extra bits of info from the user.
  2. A conditional workflow module that could branch other modules depending on the value of its output. 

Something like this would also bring in a lot more workflows that wouldn't need to interact directly with users. We could have workflows that just store settings, for example.

Link to comment
Share on other sites

Yeah. I figured it would be a fairly elegant way to add a lot of functionality without messing with Alfred's workflow model too much.

It'd also open the way for workflows to grab the results of standard Alfred searches or of other workflows and filter/process them.

ctwise can have his globbing patterns, I can have my blacklists, etc.

Link to comment
Share on other sites

  • 10 months later...

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...