---
title: StartWorkflowRun
source: https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/start-workflow-run
---

Use the `workflowAutomationStartWorkflowRun` mutation to start a workflow run for a specified workflow definition.

> #### ⚠️ IMPORTANT
>
> For limits on concurrent workflow runs and steps per run, see [Workflow System Limits](https://docs.newrelic.com/docs/workflow-automation/limitations-and-faq/workflow-limits).

## Input parameters [#input-parameters]

The following parameters are available for this API.

| Parameter              | Data type | Description                                                                                                                                          |
| ---------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `scope.id`             | String    | (Required) Your account ID.                                                                                                                          |
| `scope.type`           | Enum      | (Optional) The scope type (`ACCOUNT`).                                                                                                               |
| `definition.name`      | String    | (Required) The name of the workflow definition to run.                                                                                               |
| `definition.scopeType` | String    | (Optional) The scope type of the workflow definition (`ACCOUNT` or `ORGANIZATION`).                                                                  |
| `definition.version`   | Int       | (Optional) The version of the workflow definition to run.                                                                                            |
| `workflowInputs`       | Array     | (Optional) Key-value pairs to pass as inputs to the workflow.                                                                                        |
| `idempotencyKey`       | String    | (Optional) A UUID that ensures idempotency of the request. The server rejects non-UUID values (for example, `f47ac10b-58cc-4372-a567-0e02b2c3d479`). |
| `options.logLevel`     | Enum      | (Optional) Controls logging during execution. Values: `NONE` (default), `INFO`, `DEBUG`, `TRACE`.                                                    |

### logLevel option [#loglevel-option]

The `logLevel` option controls the amount of information the workflow generates during execution.

-   `NONE` (default): Generates no log outputs.
-   `INFO`: Outputs step-level information.
-   `DEBUG`: Adds an attribute to the step started logs with all the action step inputs, using the format `workflowAutomation.inputs.<inputName>: <inputValue>`.
-   `TRACE`: In addition to `DEBUG` output, adds an attribute to the step started logs with all the action step outputs, using the format `workflowAutomation.outputs.<outputName>: <outputValue>`.

## Sample request [#sample-request]

Use the [Query Builder](https://one.newrelic.com/nerdgraph-graphiql?state=b8f3b3a9-8d3e-c03e-5da4-34b98a57ff8f) to create and edit a workflow. See [NerdGraph API explorer](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer).

```graphql
mutation {
  workflowAutomationStartWorkflowRun(
    definition: {name: "json-parsing", version: 1}
    workflowInputs: [
      {key: "checkOperational", value: "false"}
      {key: "checkNonOperational", value: "true"}]
    scope: {id: "12345678"}
    idempotencyKey: "45e65924-5316-479c-a977-f6adfa17e07a"
    options: {logLevel: INFO}
  ) {
    runId
  }
}
```

## Sample response [#sample-response]

The mutation returns:

-   `runId`: The unique identifier for the workflow run. Use this ID with `WorkflowRunInfo`, `SignalWorkflowRun`, or `StopWorkflowRun` APIs.

## Related topics [#related-topics]

[Workflow run info](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/workflow-run-info)

Monitor the status and logs of your workflow run

[Signal workflow run](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/signal-workflow-run)

Send signals to running workflows waiting for input

[Stop workflow run](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/stop-workflow-run)

Cancel a running workflow instance

[Get workflow definition](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/get-workflow-definition)

View the workflow definition before running
