Skip to main content
Let’s talk about input parameters in Argo Workflows. This lesson shows a workflow spec that accepts a parameter named message and passes it into a container command by referencing the template input parameter. Example workflow:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: cowsay-
spec:
  entrypoint: cowsay
  arguments:
    parameters:
      - name: message
        value: "workflow arguments value"
  templates:
    - name: cowsay
      inputs:
        parameters:
          - name: message
      container:
        image: rancher/cowsay
        command: [cowsay]
        args: ["{{inputs.parameters.message}}"]
What this workflow defines:
  • A top-level default parameter under spec.arguments named message with the value "workflow arguments value".
  • A template called cowsay that declares an input parameter message.
  • The container runs the cowsay command and passes the parameter into args using Argo parameter substitution: {{inputs.parameters.message}}.
When referencing parameters inside YAML template fields, use the substitution syntax exactly as shown: . Put the substitution inside quotes (for example, args: ) so the YAML parser treats it as a string and the braces are handled correctly.
How parameter wiring works (quick reference):
FieldPurposeExample
spec.argumentsWorkflow-level default parameter values; can be overridden at submit time- name: message value: "workflow arguments value"
templates[].inputs.parametersDeclare parameters a template expects- name: message
template container args / commandUse parameter substitution to pass values into the containerargs: ["{{inputs.parameters.message}}"]
Overriding the default parameter values at runtime can be done with the Argo CLI.
  • Submit the workflow and override a single parameter from the CLI:
# Submit workflow with a single parameter from the CLI
argo submit wf.yaml -p message="message from the CLI"
  • Submit the workflow using a parameter file (YAML or JSON). Example params.yaml content:
message: "This is from a parameter file"
Submit with:
# Submit workflow with multiple parameters from a file
argo submit wf.yaml --parameter-file params.yaml
  • Invoke a different template (entrypoint) in the same workflow without editing the workflow YAML by using --entrypoint:
# Submit workflow using a different entrypoint/template
argo submit wf.yaml --entrypoint cowsay-loudly
  • Combine entrypoint override and custom parameters:
# Combine entrypoint override and custom parameter
argo submit wf.yaml \
  --entrypoint cowsay-loudly \
  -p message="Custom message"
By combining --entrypoint with -p (or --parameter-file), you can call any template in your workflow and supply or override any parameter values at submission time.
Always quote substitutions and parameter values when they include spaces or characters that YAML/CLI might interpret (for example, -p message="Hello, world!"). Unquoted braces or special characters may cause parsing errors.
Links and references

Watch Video