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.