Automator tricks: setting automator variables at workflow launch

Apart from passing parameters to a workflow launched from the command line via the automator command, it is also possible to set workflow variables. The following example shows it.

automator -D A=”pippo” -D B=”pluto” InputVarValues.workflow

This sets A to pippo and B to pluto (of course, A and B must be defined as variables in InputVarValues). The following picture shows the simple workflow:

This trivial example simply gets the values of the variables (sorry, it’s in Italian, but “Ottieni il valore della variable” means “Get the value of the variable”).

So, lauching it with command line shown above from shell script outputs:


Hardly surprising, but I’ve seen a lot of questions about “how to pass multiple values to workflow”, so this is one answer. Another answer will be given in a next post.

Tagged with:
Posted in Programming

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: