I have a workflow in Alfred that uses a python script I have written. The workflow shows the output from the python script in Alfred. However, the input to the python script being executed can sometimes return "null". In that case, I want the workflow to take another path.
The normal output is like this:
{
"items": [
{
"arg": "123",
"title": "car",
"subtitle": "car with id: 123",
"icon": {
"type": "filetype",
"path": "/Users/ml/car.png"
}
},
{
"arg": "456",
"title": "boat",
"subtitle": "board with id: 456",
"icon": {
"type": "filetype",
"path": "/Users/ml/boat.png"
}
}
]
}
In Alfred, car and boat is displayed and if car is selected I trigger another script filter with the id from the car, 123, as input to the python script and display the result of that. But if the result in first case is not car and boat, but instead:
{
"items": [
{
"arg": "null",
"title": "N/A",
"subtitle": "N/A",
"icon": {
"type": "filetype",
"path": "/Users/ml/null.png"
}
}
]
}
Then N/A is displayed in Alfred. But in this case, I want to take another path to to trigger my python script with another set of arguments. How can I do that in Alfred?