zleef Posted August 14, 2015 Share Posted August 14, 2015 I would like to have a workflow which when triggered, calls multiple other workflows. Is there a way to do this? I'm using the SmartThings workflow, which enables me to turn on/off lights. I want to be able to have a "shortcut" where it turns on/off multiple lights. So currently i run: "st Hue Lamp on" "st Hue Lamp 1 on" "st Hue Lamp 2 on" "st Hue Lamp 3 on" What i want to do is run: "st_hue" and in the background it runs all four of these. Link to comment
deanishe Posted August 15, 2015 Share Posted August 15, 2015 You can either call Alfred with your queries, waiting a wee bit between calling each one. That's the simple way.The better way is to figure out the script and arguments that your target workflow runs and call them from a bash script. Something like: #!/bin/bash ../UUID-OF-TARGET-WORKFLOW/some_script "Hue Lamp 1 on" ../UUID-OF-TARGET-WORKFLOW/some_script "Hue Lamp 2 on" # etc. # etc. Link to comment
jdfwarrior Posted August 18, 2015 Share Posted August 18, 2015 I would like to have a workflow which when triggered, calls multiple other workflows. Is there a way to do this? I'm using the SmartThings workflow, which enables me to turn on/off lights. I want to be able to have a "shortcut" where it turns on/off multiple lights. So currently i run: "st Hue Lamp on" "st Hue Lamp 1 on" "st Hue Lamp 2 on" "st Hue Lamp 3 on" What i want to do is run: "st_hue" and in the background it runs all four of these. You can either call Alfred with your queries, waiting a wee bit between calling each one. That's the simple way. The better way is to figure out the script and arguments that your target workflow runs and call them from a bash script. Something like: #!/bin/bash ../UUID-OF-TARGET-WORKFLOW/some_script "Hue Lamp 1 on" ../UUID-OF-TARGET-WORKFLOW/some_script "Hue Lamp 2 on" # etc. # etc. If you are familiar with creating/building workflows, a simple alternative also may be to just use external triggers within your workflows. This would allow you to trigger a specific part of a workflow, from another, and even pass it data. These are triggered through AppleScript. You could have a single workflow keyword that executed N number of workflows or specific parts of workflows using AppleScript and their external trigger. I've used this several times to simulate "steps" in a workflow. You use one keyword, when it completes, calls an external trigger and launches the next step, and so on. Link to comment
deanishe Posted August 24, 2015 Share Posted August 24, 2015 If you are familiar with creating/building workflows, a simple alternative also may be to just use external triggers within your workflows. This would allow you to trigger a specific part of a workflow, from another, and even pass it data. These are triggered through AppleScript. You could have a single workflow keyword that executed N number of workflows or specific parts of workflows using AppleScript and their external trigger. I've used this several times to simulate "steps" in a workflow. You use one keyword, when it completes, calls an external trigger and launches the next step, and so on. Don't any external triggers you've added to a workflow get deleted when it's updated? Link to comment
Andrew Posted August 26, 2015 Share Posted August 26, 2015 Don't any external triggers you've added to a workflow get deleted when it's updated? They shouldn't do! I just did a quick export and import of a workflow and the external trigger was intact. Link to comment
deanishe Posted August 26, 2015 Share Posted August 26, 2015 They shouldn't do! I just did a quick export and import of a workflow and the external trigger was intact. That's not exactly what I meant. If you've installed one of my workflows, but added your own External Trigger(s) to it. When I release a new version and you install it, your External Triggers will be deleted. Link to comment
Andrew Posted August 26, 2015 Share Posted August 26, 2015 That's not exactly what I meant. If you've installed one of my workflows, but added your own External Trigger(s) to it. When I release a new version and you install it, your External Triggers will be deleted. Ah ok, I understand! True then. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now