Use the workflowAutomation.workflowDefinitionValidation query to validate workflow definition YAML before creating or updating a workflow. Use this to check for syntax errors and schema violations.
Input parameters
Parameter | Data type | Description |
|---|---|---|
| Number | (Required) Your account ID. |
| String | (Required) The base64-encoded workflow definition YAML to validate. |
Sample request
query workflowDefinitionValidation { actor { account(id: 12345678) { workflowAutomation { workflowDefinitionValidation( definition: { yaml: "ICAgICAgICAgICAgICAgIG5hbWU6IG15V29ya2Zsb3cKCiAgICAgICAgICAgICAgICBzdGVwczoKICAgICAgICAgICAgICAgICAgLSBuYW1lOiBvbmx5U3RlcAogICAgICAgICAgICAgICAgICAgIHR5cGU6IHdhaXQKICAgICAgICAgICAgICAgICAgICBzZWNvbmRzOiAtNDIKCiAgICAgICAgICAgICAgICAgIC0gbmFtZTogJycKICAgICAgICAgICAgICAgICAgICB0eXBlOiB3YWl0CiAgICAgICAgICAgICAgICAgICAgc2Vjb25kczogLTQyCgogICAgICAgICAgICAgICAgICAtIG5hbWU6IG9ubHlTdGVwCiAgICAgICAgICAgICAgICAgICAgdHlwZTogYWN0aW9uCiAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiBDb25zb2xlTG9nCiAgICAgICAgICAgICAgICAgICAgdmVyc2lvbjogIiIKICAgICAgICAgICAgICAgICAgICBpbnB1dHM6CiAgICAgICAgICAgICAgICAgICAgICAgZm9vOiAiIg==" } ) { errors { message } valid } } } }}Sample response
The query returns:
valid: Boolean indicating whether the workflow definition is validerrors: Array of error objects, each containing:message: Description of validation errors (if any)