argoproj/argo-workflows · error
malformed workflow template parameter "%s": valueFrom is nil
Error message
malformed workflow template parameter "%s": valueFrom is nil
What it means
Each parameter under the binding's `spec.submit.arguments.parameters` must set `valueFrom.event` (an expr expression evaluated against the event payload). This error fires when a parameter has no valueFrom at all, meaning the dispatcher has nothing to evaluate, so submission is aborted before the workflow is created. It is a WorkflowEventBinding spec validation gap caught at dispatch time.
Source
Thrown at server/event/dispatch/operation.go:147
o.instanceIDService.Label(wf)
err = o.populateWorkflowMetadata(wf, &submit.ObjectMeta)
if err != nil {
return nil, err
}
if wf.Name == "" {
wf.SetName(wf.GetGenerateName() + util.RandSuffix())
}
// users will always want to know why a workflow was submitted,
// so we label with creator (which is a standard) and the name of the triggering event
//nolint: contextcheck
creator.LabelCreator(o.ctx, wf)
labels.Label(wf, common.LabelKeyWorkflowEventBinding, wfeb.Name)
if submit.Arguments != nil {
for _, p := range submit.Arguments.Parameters {
if p.ValueFrom == nil {
return nil, fmt.Errorf("malformed workflow template parameter \"%s\": valueFrom is nil", p.Name)
}
program, compileErr := expr.Compile(p.ValueFrom.Event, expr.Env(o.env))
if compileErr != nil {
return nil, fmt.Errorf("failed to compile workflow template parameter %s expression: %w", p.Name, compileErr)
}
result, runErr := expr.Run(program, o.env)
if runErr != nil {
return nil, fmt.Errorf("failed to evaluate workflow template parameter \"%s\" expression: %w", p.Name, runErr)
}
data, marshalErr := json.Marshal(result)
if marshalErr != nil {
return nil, fmt.Errorf("failed to convert result to JSON \"%s\" expression: %w", p.Name, marshalErr)
}
wf.Spec.Arguments.Parameters = append(wf.Spec.Arguments.Parameters, wfv1.Parameter{Name: p.Name, Value: wfv1.AnyStringPtr(wfv1.Item{Value: data})})
}
}
wf, err = client.ArgoprojV1alpha1().Workflows(wfeb.Namespace).Create(ctx, wf, metav1.CreateOptions{})
if err != nil {View on GitHub (pinned to 35bff19146)
Solutions
- Add a valueFrom with an event expression to the parameter: `parameters: [{name: msg, valueFrom: {event: '"hello"'}}]`.
- If a static value was intended, note event bindings only support valueFrom.event; embed the constant as a string expression like `valueFrom: {event: "'my-static-value'"}`.
- Check YAML indentation so `event:` is nested under `valueFrom:`.
- Test the binding with `argo submit --from eventbinding/<name>` or the event API and confirm no `WorkflowEventBindingError` event appears.
Example fix
// before
parameters:
- name: message
// after
parameters:
- name: message
valueFrom:
event: '"static message"' Defensive patterns
Strategy: validation
Validate before calling
// every submit.arguments.parameters entry must set valueFrom.event
for _, p := range wfeb.Spec.Submit.Arguments.Parameters {
if p.ValueFrom == nil || p.ValueFrom.Event == "" {
return fmt.Errorf("parameter %q must set valueFrom.event", p.Name)
}
} Prevention
- Never copy parameter blocks from plain Workflow examples; event bindings require valueFrom.event.
- Validate bindings with `argo lint` and a unit test against the CRD schema before apply.
- Use kubectl apply with server-side dry-run to catch structurally malformed bindings.
- Keep valueFrom YAML block correctly indented under each parameter entry.
When it happens
Trigger: A WorkflowEventBinding declares submit.arguments.parameters with only `name` (no `valueFrom:`), or valueFrom was dropped/omitted in YAML (e.g. wrong indentation nesting valueFrom under the wrong key). Dispatch of a matching event then fails for every such parameter.
Common situations: Copy-paste from a plain Workflow example where parameters carry static `value:`; YAML indentation error nesting `event:` outside `valueFrom`; hand-editing the binding CR and deleting the valueFrom block; schema validation not enforcing this at apply time (CRD allows it).
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- CodeBadRequest
- failed to compile workflow template parameter %s expression:
- requested configuration is invalid: %w
- duplicate synchronization item found
- unable to parse node field selector '%s': %w
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/4bc4d83a64e1d448.
Report an issue: GitHub.