Add variables to a workflow in Automator on Mac
You can drag a variable to a workflow and have the value of the variable used by the actions that follow. The value of the variable is evaluated when the workflow runs.
Click Variables in the top-left corner of the Automator window, then select a category from the Library.
The variables related to that category are displayed.
Drag the variable you want to use into the workflow.
A Get Value of Variable action is added to the workflow. The value of the variable is passed to the next action.
If the Get Value of Variable action receives text as input from the previous action, the variable is appended to the text.