Skip to main content
In this lesson you’ll learn how to define and use workflow-level (global) parameters in Argo Workflows. Parameters declared under spec.arguments.parameters are available to the entire workflow and can be consumed by one or more templates. This pattern enables reusing a single workflow manifest while supplying different inputs at submit time. Example: a minimal workflow that declares a global message parameter and passes it into a template to be used as the container argument:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: cowsay-
spec:
  entrypoint: cowsay
  arguments:
    parameters:
    - name: message
      value: "a message from the workflow arguments section"
  templates:
  - name: cowsay
    inputs:
      parameters:
      - name: message
    container:
      image: rancher/cowsay
      command: [cowsay]
      args: ["{{inputs.parameters.message}}"]
Key points
  • Declare workflow-global parameters under spec.arguments.parameters.
  • Inside a template, declare the same parameter name under inputs.parameters and reference it with {{inputs.parameters.<name>}}.
  • Some fields also support direct workflow-level references using {{workflow.parameters.<name>}}.
A common way to reference a workflow parameter inside a template is to declare the parameter under the template’s inputs.parameters and then use the expression {{inputs.parameters.<name>}} in container args or other fields that accept template expressions. You can also reference workflow-level parameters directly using {{workflow.parameters.<name>}} in fields that accept template expressions.
Submit the workflow and watch the run (example using a public manifest URL):
argo -n argo submit https://gist.githubusercontent.com/sidd-harth/d8e60353a95606b13f9c41f6fb59bf34/raw/66ae1738a05943a9ef7a220f3d49425d59993c90/workflow-2.yml --watch
Sample CLI output while the workflow is running:
Name:                 cowsay-tptgl
Namespace:            argo
ServiceAccount:       unset (will run with the default ServiceAccount)
Status:               Running
Created:              Fri Oct 24 06:35:15 +0000 (4 seconds ago)
Started:              Fri Oct 24 06:35:15 +0000 (4 seconds ago)
Duration:             4 seconds
Progress:             0/1
Parameters:
  message:            a message from the workflow arguments section

STEP           TEMPLATE   PODNAME         DURATION  MESSAGE
⟳ cowsay-tptgl  cowsay     cowsay-tptgl   4s
You can also inspect and interact with the run in the Argo Workflows web UI. The workflow graph shows the single cowsay node for this run:
A browser screenshot of the Argo Workflows web interface showing a workflow graph with a single node labeled "cowsay-tptgl." Top action buttons (RESUBMIT, SUSPEND, STOP, TERMINATE, DELETE, LOGS, SHARE, WORKFLOW LINK) and a left-hand icon toolbar are visible.
When the run finishes successfully, the workflow parameters are shown in the completed status and the container logs include the parameter value:
Name:                   cowsay-tptgl
Namespace:              argo
ServiceAccount:         unset (will run with the default ServiceAccount)
Status:                 Succeeded
Conditions:
  PodRunning            False
  Completed             True
Created:                Fri Oct 24 06:35:15 +0000 (38 seconds ago)
Started:                Fri Oct 24 06:35:15 +0000 (38 seconds ago)
Finished:               Fri Oct 24 06:35:52 +0000 (1 second ago)
Duration:               37 seconds
Progress:               1/1
Parameters:
  message:              a message from the workflow arguments section

STEP             TEMPLATE   PODNAME         DURATION   MESSAGE
✔ cowsay-tptgl     cowsay     cowsay-tptgl    26s
Logs from the cowsay container:
/ a message from the workflow arguments \
\ section                                 /
------------------------------------------
       ^   ^
      (oo)\_______
      (__) \       )\/\
           ||----w |
           ||     ||
Overriding the global parameter at submit time
  • UI: Click Resubmit in the web UI and edit parameter values before resubmitting.
  • CLI: Pass parameters inline with -p (or --parameter).
Example — override message via CLI:
argo -n argo submit arguments-parameters.yaml -p message="with great power comes great responsibility" --watch
Submitting with an overridden parameter produces a run using the new message. Example running status after overriding via CLI:
Name:                   cowsay-ljb54
Namespace:              argo
ServiceAccount:         unset (will run with the default ServiceAccount)
Status:                 Running
Created:                Fri Oct 24 06:37:10 +0000 (3 seconds ago)
Started:                Fri Oct 24 06:37:10 +0000 (3 seconds ago)
Duration:               3 seconds
Progress:               0/1
Parameters:
  message:              with great power comes great responsibility

STEP            TEMPLATE   PODNAME         DURATION  MESSAGE
◉ cowsay-ljb54  cowsay     cowsay-ljb54    3s
Logs showing the overridden text:
cowsay-ljb54: time="2025-10-24T06:37:33 UTC" level=info msg="capturing logs" argo=true
cowsay-ljb54:
cowsay-ljb54:  / with great power comes great \
cowsay-ljb54:  \ responsibility               /
cowsay-ljb54:   ------------------------------
cowsay-ljb54:
cowsay-ljb54:        \   ^__^
cowsay-ljb54:         \  (oo)\_______
cowsay-ljb54:            (__)\       )\/\
cowsay-ljb54:                ||----w |
cowsay-ljb54:                ||     ||
cowsay-ljb54:
cowsay-ljb54: time="2025-10-24T06:37:34 UTC" level=info msg="sub-process exited" argo=true error="<nil>"
Parameter passing options at a glance
MethodCLI exampleNotes
Inline single parameter-p message="goodbye world"Quick override for one or few values
Parameters file (YAML/JSON)--parameter-file params.yamlparams.yaml can be a YAML or JSON map of key/value pairs
Change entrypoint at submit--entrypoint print-message-caps -p message="HELLO"Useful when a manifest contains multiple templates and you want to run a different entrypoint
Web UI resubmitN/AEdit parameters interactively and resubmit the workflow
Example parameter file (params.yaml):
message: goodbye world
CLI using parameter file:
argo submit arguments-parameters.yaml --parameter-file params.yaml
Tips and references
  • Reuse the same manifest by changing inputs and entrypoints at submit time—no need to edit the YAML file.
  • For nested workflows or complex templates, prefer declaring template inputs.parameters and passing values via spec.arguments.parameters to keep intent explicit.
  • See the official Argo Workflows documentation for more parameter patterns and expression usage: Argo Workflows — Parameters and Artifacts.
Further reading

Watch Video