Use the workflowAutomation.workflow query to get and return a workflow definition.
Input parameters
Parameter | Data type | Description |
|---|---|---|
| Number | (Required) Your account ID. |
| String | (Required) The name of the workflow definition to retrieve. |
| Number | (Required) The version of the workflow definition to retrieve. |
Sample request
Use the Query Builder to create and edit a workflow. See NerdGraph API explorer.
{ actor { account(id: 12345678) { workflowAutomation { workflow(name: "my-workflow", version: 1) { definition { name version yaml } } } } }}Sample response
The query returns:
definition.name: The name of the workflow definitiondefinition.version: The version number of the workflow definitiondefinition.yaml: The base64-encoded workflow definition YAML