{"record":{"id":"4bc4d83a64e1d448","repo":"argoproj/argo-workflows","slug":"malformed-workflow-template-parameter-s-valuef","errorCode":null,"errorMessage":"malformed workflow template parameter \"%s\": valueFrom is nil","messagePattern":"malformed workflow template parameter \"(.+?)\": valueFrom is nil","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/event/dispatch/operation.go","lineNumber":147,"sourceCode":"\t\to.instanceIDService.Label(wf)\n\t\terr = o.populateWorkflowMetadata(wf, &submit.ObjectMeta)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif wf.Name == \"\" {\n\t\t\twf.SetName(wf.GetGenerateName() + util.RandSuffix())\n\t\t}\n\n\t\t// users will always want to know why a workflow was submitted,\n\t\t// so we label with creator (which is a standard) and the name of the triggering event\n\t\t//nolint: contextcheck\n\t\tcreator.LabelCreator(o.ctx, wf)\n\t\tlabels.Label(wf, common.LabelKeyWorkflowEventBinding, wfeb.Name)\n\t\tif submit.Arguments != nil {\n\t\t\tfor _, p := range submit.Arguments.Parameters {\n\t\t\t\tif p.ValueFrom == nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"malformed workflow template parameter \\\"%s\\\": valueFrom is nil\", p.Name)\n\t\t\t\t}\n\t\t\t\tprogram, compileErr := expr.Compile(p.ValueFrom.Event, expr.Env(o.env))\n\t\t\t\tif compileErr != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to compile workflow template parameter %s expression: %w\", p.Name, compileErr)\n\t\t\t\t}\n\t\t\t\tresult, runErr := expr.Run(program, o.env)\n\t\t\t\tif runErr != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to evaluate workflow template parameter \\\"%s\\\" expression: %w\", p.Name, runErr)\n\t\t\t\t}\n\t\t\t\tdata, marshalErr := json.Marshal(result)\n\t\t\t\tif marshalErr != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to convert result to JSON \\\"%s\\\" expression: %w\", p.Name, marshalErr)\n\t\t\t\t}\n\t\t\t\twf.Spec.Arguments.Parameters = append(wf.Spec.Arguments.Parameters, wfv1.Parameter{Name: p.Name, Value: wfv1.AnyStringPtr(wfv1.Item{Value: data})})\n\t\t\t}\n\t\t}\n\t\twf, err = client.ArgoprojV1alpha1().Workflows(wfeb.Namespace).Create(ctx, wf, metav1.CreateOptions{})\n\t\tif err != nil {","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/server/event/dispatch/operation.go#L129-L165","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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."],"exampleFix":"// before\nparameters:\n  - name: message\n// after\nparameters:\n  - name: message\n    valueFrom:\n      event: '\"static message\"'","handlingStrategy":"validation","validationCode":"// every submit.arguments.parameters entry must set valueFrom.event\nfor _, p := range wfeb.Spec.Submit.Arguments.Parameters {\n    if p.ValueFrom == nil || p.ValueFrom.Event == \"\" {\n        return fmt.Errorf(\"parameter %q must set valueFrom.event\", p.Name)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["configuration","workflow-event-binding","validation","yaml","argo-workflows"],"backgroundTag":"missing-required-argument","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}