Copy Automation

Duplicate an existing automation, including its trigger and all actions, into your current workspace.


Use the copyAutomation mutation to duplicate an existing automation. The copy reproduces the source automation’s trigger configuration and every action, then attaches it to the workspace in your current request context. Copies are always created inactive — activate them with editAutomation once you’re ready for them to fire.

Automations are Automation objects in the API. Workspaces are Workspace objects.

The copy lands in your current workspace

copyAutomation looks up the source automation by ID without scoping to a workspace, but it always creates the copy in the workspace named by your blue-workspace-id header. If the source belongs to a different workspace, the copy is still created in your current one — so this is a workspace-to-workspace copy whenever the IDs differ.

Request

The only field you need is the ID of the automation to copy.

mutation CopyAutomation {
  copyAutomation(input: { automationId: "automation_123" }) {
    id
    isActive
    trigger {
      type
    }
    actions {
      type
    }
    createdAt
  }
}

Parameters

CopyAutomationInput

ParameterTypeRequiredDescription
automationIdString!YesID of the automation to copy. Looked up globally, not scoped to a workspace.
isActiveBooleanNoCurrently ignored. The resolver always creates the copy with isActive: false. To activate the copy, call editAutomation afterward.
isActive is a no-op

CopyAutomationInput accepts isActive, but the mutation hard-codes the copy to isActive: false and never reads the value you pass. Sending isActive: true does not produce an active copy. Plan to activate via editAutomation.

Response

The mutation returns the newly created Automation. Note isActive is false regardless of the input.

{
  "data": {
    "copyAutomation": {
      "id": "clm4n8qwx000008l0g4oxdqn7",
      "isActive": false,
      "trigger": {
        "type": "TODO_CREATED"
      },
      "actions": [
        {
          "type": "ADD_TAG"
        }
      ],
      "createdAt": "2026-05-29T14:21:08.000Z"
    }
  }
}

Returns

The Automation object:

FieldTypeDescription
idID!Unique identifier of the new copy.
triggerAutomationTrigger!The duplicated trigger configuration.
actions[AutomationAction!]!The duplicated actions, in order.
isActiveBoolean!Always false for a fresh copy.
createdByUser!The user who ran the copy — not the original automation’s author.
projectWorkspace!The workspace the copy was created in (your current context).
createdAtDateTime!When the copy was created.
updatedAtDateTime!When the copy was last updated.

Full example

A deeper selection that reads back the duplicated trigger, every action field, and all three commonly populated AutomationActionMetadata members via inline fragments.

mutation CopyAutomationDetailed {
  copyAutomation(input: { automationId: "automation_123" }) {
    id
    isActive
    trigger {
      id
      type
      color
      conditionMode
      filterGroups
      filterGroupLinks
      todoList {
        id
        title
      }
      tags {
        id
        title
      }
      assignees {
        id
        fullName
      }
      customField {
        id
        name
        type
      }
      customFieldOptions {
        id
        title
      }
    }
    actions {
      id
      type
      duedIn
      color
      assigneeTriggerer
      todoList {
        id
        title
      }
      tags {
        id
        title
      }
      assignees {
        id
        fullName
      }
      customField {
        id
        name
      }
      customFieldOptions {
        id
        title
      }
      projects {
        id
        name
      }
      portableDocument {
        id
      }
      httpOption {
        url
        method
        contentType
        authorizationType
      }
      metadata {
        ... on AutomationActionMetadataSendEmail {
          email {
            subject
            to
            from
            cc
            bcc
            content
          }
        }
        ... on AutomationActionMetadataCreateChecklist {
          checklists {
            title
            position
            checklistItems {
              title
              position
              duedIn
            }
          }
        }
        ... on AutomationActionMetadataCopyRecord {
          copyTodoOptions
          copyCustomFieldIds
        }
      }
    }
    createdBy {
      id
      fullName
      email
    }
    createdAt
    updatedAt
  }
}

What gets copied

  • Trigger — type, color, condition mode, filter groups, target list, tags, assignees, custom field, and custom-field options.
  • Actions — type, due offset (duedIn), color, target list, tags, assignees, target workspaces, linked PDF, HTTP request configuration, and all action metadata (email content, checklist templates, copy-record options including the selected custom-field IDs).
  • Assignee fallback — for ASSIGNEE_ADDED and ASSIGNEE_REMOVED triggers, if the source has no assignees configured, the user running the copy is added as the default assignee.

What does not carry over:

  • Active state — the copy is always inactive (see above).
  • ScheduleSCHEDULED triggers are not rescheduled on copy. Activating the copy via editAutomation starts its schedule.

Errors

CodeWhen
UNAUTHENTICATEDNo valid credentials were provided. Message: You are not authenticated.
FORBIDDENThe caller isn’t an OWNER or ADMIN of the current workspace, or the workspace is archived. Message: You are not authorized.
(none)The automationId doesn’t exist, or the automation has no trigger. The resolver throws a plain Error("Automation or its trigger not found") with no extensions.code, so it surfaces as a generic server error rather than a coded one. The permission check runs first, so an unknown ID from an unauthorized context returns FORBIDDEN before this is reached.
{
  "errors": [
    {
      "message": "Automation or its trigger not found"
    }
  ],
  "data": null
}

Permissions

Only OWNER or ADMIN members of an active (non-archived) workspace can copy automations. The check runs against your current workspace context (blue-workspace-id), not the source automation’s workspace.

Access levelCan copy automations
OWNERYes
ADMINYes
MEMBERNo
CLIENTNo