Home » Questions » Computers [ Ask a new question ]

Can Automator branch based on the value of a variable or the result of a step?

Can Automator branch based on the value of a variable or the result of a step?

I am editing an Automator workflow that currently takes several stored spreadsheets and emails them to different individuals. The spreadsheets are stored on a Windows server and are created by a separate process not germane to this discussion. But once they're created, I want the user to be able to click on this action and have the mail messages (usually 8 of them) pop up to be sent.

Asked by: Guest | Views: 72
Total answers/comments: 1
Guest [Entry]

"You could split it into 3 automator apps and branch with a shell script. Run the normal workflow up to the connection check, and then use the automator action Do Shell Script.

That script could be something like:

#! /bin/bash

if
<your command to test connection>
then
open /pathto/automator_connected.app
else
open /pathto/automator_not_connected.app
fi

automator_connected.app would contain the remainder of you automator workflow

automator_not_connected.app would contain the actions to take if the server connection fails"