> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# updateAutomationRule

> Update an automation rule, its actions, and its audience filter. Omit
automationRuleActions to leave the actions unchanged. Re-validates each action
it changes; an existing action sent back by its id exactly as stored is kept
without re-validating it. Resuming a paused rule or saving a suspended one
re-validates every action instead, so a rule whose configuration has gone
stale cannot be resumed here — pause it with `pauseAutomationRule` instead. A
rule whose trigger target was deleted stays suspended when saved with its
stored target, and `paused: false` is refused until the rule is given a target that exists.

**Required scope:** `host:write:network_integrations`



**mutation** `updateAutomationRule(input: UpdateAutomationRuleInput!): UpdateAutomationRulePayload`

> Deprecated: Use updateAutomationWorkflow.

## Arguments

**`input`**: `UpdateAutomationRuleInput!` (required)

Parameters for UpdateAutomationRule

## Returns

`UpdateAutomationRulePayload`

**`automationRule`**: `AutomationRule`

---

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`errors`**: `[String!]!`

## Examples

```graphql Mutation
mutation UpdateAutomationRule($input: UpdateAutomationRuleInput!) {
  updateAutomationRule(input: $input) {
    automationRule {
      automationRuleActions {
        actionType
        asset {
          __typename
        }
        configParameters
        createdAt
        delaySeconds
        embeddedLink {
          __typename
        }
      }
      automationRuleFilter {
        aiFilterPrompt
        id
        marketingAudiences {
          __typename
        }
        resourceId
      }
      billingPlanRestricted
      createdAt
      creator {
        ambassadorLevel
        ambassadorLevelId
        avatarUrl
        badges {
          __typename
        }
        communityRole
        conversations {
          __typename
        }
      }
      description
    }
    clientMutationId
    errors
  }
}
```

```json Variables
{
  "input": {
    "id": "id",
    "trigger": "ADDED_BADGE"
  }
}
```

```json Response
{
  "data": {
    "updateAutomationRule": {
      "automationRule": {
        "automationRuleActions": [
          {
            "actionType": "ADD_BADGE",
            "asset": {
              "__typename": "Asset"
            },
            "configParameters": "value",
            "createdAt": "value",
            "delaySeconds": 1,
            "embeddedLink": {
              "__typename": "EmbeddedLink"
            }
          }
        ],
        "automationRuleFilter": {
          "aiFilterPrompt": "string",
          "id": "id",
          "marketingAudiences": [
            {
              "__typename": "MarketingAudience"
            }
          ],
          "resourceId": "id"
        },
        "billingPlanRestricted": true,
        "createdAt": "value",
        "creator": {
          "ambassadorLevel": "string",
          "ambassadorLevelId": 1,
          "avatarUrl": "string",
          "badges": [
            {
              "__typename": "Badge"
            }
          ],
          "communityRole": "CONTRIBUTOR",
          "conversations": {
            "__typename": "PublicConversationConnection"
          }
        },
        "description": "string"
      },
      "clientMutationId": "string",
      "errors": [
        "string"
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.