Jump to content

[SOLVED] Question on output from Script Filter

Recommended Posts

I have a script filter node that isn't behaving as I'd expect - see image attached. I have it's output connected to a post notification. What I'm thinking should happen is:


1. type 'jjj' <return>

2. type some argument <return>

3. the workflow runs and the argument I typed should appear in the post notification.


What actually happens is that at step 2, when I try to type an argument the jjj workflow disappears and I see a list of google, amazon and Wikipedia searches.


what am I missing?


Screen Shot 2018-05-09 at 22.38.33.png

Link to comment

The workflow disappear has Alfred didn't see a JSON format string (or XML) as the output of your Script Filter. If you don't want to output JSON/XML than it would be better with a simple Keyword object connected to a Run Script object. Then you will be able to do what you want (but you shouldn't press <enter> on your step 1, but more: 'jjj' <space>).


If you want to do it with a Script Filter, just replace your script with:


import sys, json

query = sys.argv[1]

data = { 'items' : [{
    'title': 'goto collection',
    'subtitle': query,
    'arg': query,
}] }



Link to comment
  • vitor changed the title to [SOLVED] Question on output from Script Filter

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