---
title: SignalWorkflowRun
source: https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/signal-workflow-run
---

This API triggers a signal to an existing running workflow. This can be used to send callback and be evaluated by the workflow to go to different next steps. Parameters can be passed along with the signal.

## Input parameters

| Parameter      | Type   | Required | Description                                                                          |
| -------------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| `accountId`    | Number | Yes      | Your account ID.                                                                     |
| `runId`        | String | Yes      | The unique identifier of the running workflow. Obtained from `StartWorkflowRun` API. |
| `signalName`   | String | Yes      | The name of the signal defined in the workflow's wait step.                          |
| `signalInputs` | Array  | No       | Optional key-value pairs to pass data with the signal.                               |

## Sample request

Given the workflow definition below and a workflow already running

```yaml
name: signalDemo

steps:
  - name: waitStep
    type: wait
    seconds: 300
    signals:
      - name: approve
        next: signalHandler
      - name: cancel
        next: signalHandler

  - name: NoSignalReceived
    type: action
    action: newrelic.ingest.sendLogs
    version: 1
    inputs:
      logs:
        - message: "no signals received"
    next: end

  - name: signalHandler
    type: action
    action: newrelic.ingest.sendLogs
    version: 1
    inputs:
      logs:
        - message: "signal '${{ .steps.waitStep.outputs.signalName }}' was received with: '${{ .steps.waitStep.outputs.signalInputs | tostring }}'"
```

After starting this workflow, this runId is returned upon start `107e6df2-aa17-41bc-8065-bfa46bde810b`

The workflow can then be signaled with this mutation

```graphql
mutation {
  workflowAutomationSignalWorkflowRun(
    accountId: 11933347
    runId: "107e6df2-aa17-41bc-8065-bfa46bde810b"
    signalName: "approve"
    signalInputs: [
      {key: "foo", value: "bar"}
    ]
  ) {
    runId
  }
}
```

## Example log output

The following can be observed in the Logs if the workflow was started with the `options: {logLevel: DEBUG}`:

![Screenshot displaying Logs if the workflow was started with the options: {logLevel: DEBUG}](https://docs.newrelic.com/images/signal-workflow-run.webp "Screenshot displaying Logs if the workflow was started with the options: {logLevel: DEBUG}")

## Sample response

The mutation returns:

-   `runId`: The unique identifier of the workflow run that received the signal.

## Related topics [#related-topics]

[Definition schema: Wait step](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/definition-schema#wait)

Learn how to configure wait steps with signals

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

Execute a workflow to get a runId for signaling

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

Check if workflow is waiting for a signal
