Edit Automation

Update an existing automation's trigger, actions, or active status


Edit Automation

Update an existing automation by modifying its trigger, actions, or active status. All fields in the input are optional except automationId, allowing you to update only the parts you need. When updating actions, the existing actions are replaced entirely with the new set.

Basic Example

mutation EditAutomation {
  editAutomation(
    input: {
      automationId: "automation_abc123"
      isActive: false
    }
  ) {
    id
    isActive
    updatedAt
  }
}

Advanced Example

mutation EditAutomationAdvanced {
  editAutomation(
    input: {
      automationId: "automation_abc123"
      isActive: true
      trigger: {
        type: TODO_LIST_CHANGED
        todoListId: "list_new456"
        tagIds: ["tag_789"]
        conditionMode: ANY
      }
      actions: [
        {
          type: ADD_ASSIGNEE
          assigneeIds: ["user_101"]
        }
        {
          type: CHANGE_DUE_DATE
          duedIn: 14
        }
        {
          type: SEND_EMAIL
          metadata: {
            email: {
              to: ["[email protected]"]
              from: "[email protected]"
              subject: "Updated automation triggered"
              content: "<p>An automation has been triggered.</p>"
            }
          }
        }
      ]
    }
  ) {
    id
    isActive
    trigger {
      id
      type
      todoList {
        id
        title
      }
      tags {
        id
        title
      }
      conditionMode
    }
    actions {
      id
      type
      duedIn
      assignees {
        id
        name
      }
      metadata {
        ... on AutomationActionMetadataSendEmail {
          email {
            subject
            to
          }
        }
      }
    }
    createdBy {
      id
      name
    }
    updatedAt
  }
}

Input Parameters

EditAutomationInput

ParameterTypeRequiredDescription
automationIdString!YesThe ID of the automation to update
triggerCreateAutomationTriggerInputNoUpdated trigger configuration (replaces the existing trigger)
actions[CreateAutomationActionInput!]NoUpdated list of actions (replaces all existing actions)
isActiveBooleanNoSet the automation’s active state

The trigger and actions inputs use the same types as createAutomation. See Create Automation for the full parameter reference for CreateAutomationTriggerInput and CreateAutomationActionInput.

Response Fields

The mutation returns the updated Automation object.

FieldTypeDescription
idID!Unique identifier for the automation
triggerAutomationTrigger!The updated trigger configuration
actions[AutomationAction!]!The updated actions list
isActiveBoolean!Current active status
createdByUser!The user who originally created the automation
projectProject!The project this automation belongs to
createdAtDateTime!Original creation timestamp
updatedAtDateTime!Timestamp of this update

Required Permissions

Access LevelCan Edit Automations
OWNERYes
ADMINYes
MEMBERNo
CLIENTNo

Only owners and admins of an active project can edit automations.

Error Responses

Authentication Required

{
  "errors": [{
    "message": "You must be logged in",
    "extensions": {
      "code": "UNAUTHENTICATED"
    }
  }]
}

When: No valid authentication token is provided.

Unauthorized

{
  "errors": [{
    "message": "Unauthorized",
    "extensions": {
      "code": "UNAUTHORIZED"
    }
  }]
}

When: The authenticated user does not have OWNER or ADMIN access to the project, or the project is archived.

Automation Not Found

{
  "errors": [{
    "message": "Automation not found",
    "extensions": {
      "code": "NOT_FOUND"
    }
  }]
}

When: The specified automationId does not exist or belongs to a different project.

Important Notes

  • Partial Updates: You can update just the isActive status without changing the trigger or actions
  • Actions Replacement: When providing actions, the entire set of existing actions is replaced – there is no way to update individual actions
  • Trigger Update: The trigger is updated in place, preserving its ID
  • Schedule Management: Changing a trigger to or from SCHEDULED type automatically manages the underlying schedule jobs
  • Due Date Triggers: Changes to DUE_DATE_EXPIRED triggers automatically update monitoring jobs
  • Conditional Automations: Editing a CONDITIONAL automation re-populates its evaluation cache; changing away from CONDITIONAL type clears the cache
  • Active Toggle: Deactivating a scheduled automation pauses its schedule; reactivating it resumes the schedule