Create Automation

Create an automation with a trigger and one or more actions that run when the trigger fires.


Use the createAutomation mutation to build an automation in a workspace: a single trigger (the event to watch for) plus one or more actions that run when the trigger fires. Automations are workspace-scoped (workspaces are Workspace objects in the API) and are created in an active state by default.

The automation is created in the workspace identified by the blue-workspace-id header, which accepts a workspace ID or slug.

Request

The smallest automation needs a trigger type and at least one action. This one adds a tag to every record (Record) the moment it is created.

mutation CreateAutomation {
  createAutomation(
    input: { trigger: { type: TODO_CREATED }, actions: [{ type: ADD_TAG, tagIds: ["tag_123"] }] }
  ) {
    id
    isActive
    trigger {
      id
      type
    }
    actions {
      id
      type
    }
    createdAt
  }
}

Parameters

CreateAutomationInput

ParameterTypeRequiredDescription
triggerCreateAutomationTriggerInput!YesThe event that starts the automation.
actions[CreateAutomationActionInput!]!YesOne or more actions to run when the trigger fires, in order.

CreateAutomationTriggerInput

The trigger fields that apply depend on type. Most fields are filters that narrow when the trigger fires; schedule is only for SCHEDULED triggers, and conditionMode is only for CONDITIONAL triggers.

ParameterTypeRequiredDescription
typeAutomationTriggerType!YesThe event that triggers the automation. See AutomationTriggerType.
metadataAutomationTriggerMetadataInputNoTrigger-specific settings (e.g. due-date offset for DUE_DATE_EXPIRED).
customFieldIdStringNoCustom field to watch (for custom-field triggers).
customFieldOptionIds[String!]NoSpecific custom-field option IDs to match.
todoListIdStringNoRestrict the trigger to a single list (RecordList).
todoListIds[String!]NoRestrict the trigger to multiple lists.
tagIds[String!]NoTag IDs that must match.
todoIds[String!]NoRestrict the trigger to specific records.
assigneeIds[String!]NoAssignee (user) IDs that must match.
colorStringNoColor to match (hex, e.g. #FF5733).
colors[String!]NoMultiple colors to match.
dueStartDateTimeNoStart of a due-date range to match.
dueEndDateTimeNoEnd of a due-date range to match.
showCompletedBooleanNoInclude completed records when matching.
fieldsJSONNoOpaque, internally structured field-condition payload, mirrored from the workspace filter UI. Build it in the app rather than by hand.
opFilterLogicalOperatorNoHow to combine filter conditions: AND or OR.
conditionModeConditionalAutomationModeNoFor CONDITIONAL triggers only: STARTS_MATCHING or STOPS_MATCHING.
filterGroupsJSONNoOpaque, internally structured filter-group payload for CONDITIONAL triggers. Build it in the app.
filterGroupLinksJSONNoOpaque, internally structured links between filter groups. Build it in the app.
scheduleCreateAutomationTriggerScheduleInputNoRequired for SCHEDULED triggers; ignored otherwise.

CreateAutomationTriggerScheduleInput

Configures a SCHEDULED trigger. hour, minute, and timezone are always required; the other fields are used by specific type values (e.g. dayOfWeek for WEEKLY, dayOfMonth for MONTHLY, cronExpression for CUSTOM).

ParameterTypeRequiredDescription
typeAutomationScheduleType!YesSchedule frequency. See AutomationScheduleType.
hourInt!YesHour of day to run, 023.
minuteInt!YesMinute of hour to run, 059.
timezoneString!YesIANA timezone, e.g. "America/New_York".
days[Int!]NoSpecific days for the schedule.
dayOfWeek[Int!]NoDays of week, 0=Sunday through 6=Saturday. Used by WEEKLY.
dayOfMonthIntNoDay of month, 131. Used by MONTHLY/YEARLY.
monthIntNoMonth of year, 112. Used by YEARLY.
cronExpressionStringNoCustom cron expression. Used by CUSTOM.
isActiveBooleanNoWhether the schedule is active.

AutomationTriggerMetadataInput

ParameterTypeRequiredDescription
incompleteOnlyBooleanNoOnly fire for incomplete records (for due-date triggers).
offsetIntNoMinutes before/after the due date to fire. Read by DUE_DATE_EXPIRED to schedule its monitoring jobs.

CreateAutomationActionInput

The fields that apply depend on type — e.g. tagIds for ADD_TAG/REMOVE_TAG, assigneeIds for ADD_ASSIGNEE, duedIn for CHANGE_DUE_DATE, metadata.email for SEND_EMAIL, httpOption for MAKE_HTTP_REQUEST.

ParameterTypeRequiredDescription
typeAutomationActionType!YesThe action to run. See AutomationActionType.
duedInIntNoDays from the trigger to set the due date (for CHANGE_DUE_DATE).
customFieldIdStringNoTarget custom field (for ADD_CUSTOM_FIELD/REMOVE_CUSTOM_FIELD).
customFieldOptionIds[String!]NoCustom-field option IDs to set.
todoListIdStringNoTarget list for CHANGE_TODO_LIST.
metadataAutomationActionMetadataInputNoAction-specific payload (email, checklists, copy options, field values).
tagIds[String!]NoTags to add or remove.
assigneeIds[String!]NoAssignees to add or remove.
projectIds[String!]NoTarget workspaces for ADD_PROJECT.
colorStringNoColor to apply (hex), for ADD_COLOR.
assigneeTriggererStringNoUsed by ADD_ASSIGNEE_TRIGGERER/REMOVE_ASSIGNEE_TRIGGERER to act on the user who fired the trigger.
portableDocumentIdStringNoDocument template ID for GENERATE_PDF.
httpOptionAutomationActionHttpOptionInputNoHTTP request configuration for MAKE_HTTP_REQUEST.

AutomationActionMetadataInput

ParameterTypeRequiredDescription
emailAutomationActionSendEmailInputNoEmail configuration for SEND_EMAIL.
checklists[AutomationActionCreateChecklistInput]NoChecklists to create for CREATE_CHECKLIST.
copyTodoOptions[CopyRecordOption!]NoWhat to copy for COPY_TODO. See CopyRecordOption.
numberFloatNoNumeric value for custom-field actions.
textStringNoText value for custom-field actions.

AutomationActionSendEmailInput

Used by SEND_EMAIL actions. to, content, and subject are required; the rest are optional.

ParameterTypeRequiredDescription
to[String!]!YesRecipient email addresses.
contentString!YesEmail body. HTML is supported.
subjectString!YesEmail subject line.
fromStringNoSender address.
cc[String!]NoCC recipients.
bcc[String!]NoBCC recipients.
replyTo[String!]NoReply-to addresses.
attachments[AutomationActionSendEmailAttachmentInput!]NoFile attachments.

AutomationActionSendEmailAttachmentInput

ParameterTypeRequiredDescription
uidString!YesUploaded file UID.
nameString!YesFile name.
sizeFloat!YesFile size in bytes.
typeString!YesMIME type.
extensionString!YesFile extension.

AutomationActionCreateChecklistInput

Used by CREATE_CHECKLIST actions. title and position are required.

ParameterTypeRequiredDescription
titleString!YesChecklist title.
positionFloat!YesSort position among checklists.
checklistItems[AutomationActionCreateChecklistItemInput!]NoItems to create inside the checklist.

AutomationActionCreateChecklistItemInput

ParameterTypeRequiredDescription
titleString!YesItem title.
positionFloat!YesSort position among items.
assigneeIds[String!]NoUsers to assign to the item.
duedInIntNoDays from creation to set the item’s due date.

AutomationActionHttpOptionInput

Used by MAKE_HTTP_REQUEST actions.

ParameterTypeRequiredDescription
urlString!YesThe URL to call.
methodHttpMethod!YesOne of GET, POST, PUT, DELETE, PATCH.
headers[HttpHeaderInput]NoRequest headers.
parameters[HttpParameterInput]NoQuery parameters.
contentTypeHttpContentTypeNoJSON or TEXT.
bodyStringNoRequest body.
authorizationTypeHttpAuthorizationTypeNoBASIC_AUTH, BEARER, API_KEY, or OAUTH2.
authorizationBasicAuthHttpAuthorizationBasicAuthInputNoCredentials when authorizationType is BASIC_AUTH.
authorizationBearerTokenStringNoToken when authorizationType is BEARER.
authorizationApiKeyHttpAuthorizationApiKeyInputNoKey config when authorizationType is API_KEY.
oauthConnectionIdStringNoOAuth connection ID when authorizationType is OAUTH2.

HttpHeaderInput / HttpParameterInput

ParameterTypeRequiredDescription
keyString!YesHeader or parameter name.
valueString!YesHeader or parameter value.

HttpAuthorizationBasicAuthInput

ParameterTypeRequiredDescription
usernameString!YesBasic-auth username.
passwordString!YesBasic-auth password.

HttpAuthorizationApiKeyInput

ParameterTypeRequiredDescription
keyString!YesAPI key name.
valueString!YesAPI key value.
passByHttpAuthorizationApiKeyPassByNoWhere to send the key: HEADER or QUERY.

AutomationTriggerType

ValueFires when
TODO_CREATEDA record is created.
TODO_LIST_CHANGEDA record moves to a different list.
TODO_MARKED_AS_COMPLETEA record is completed.
TODO_MARKED_AS_INCOMPLETEA record is reopened.
ASSIGNEE_ADDEDAn assignee is added.
ASSIGNEE_REMOVEDAn assignee is removed.
DUE_DATE_CHANGEDA record’s due date changes.
DUE_DATE_REMOVEDA record’s due date is cleared.
TAG_ADDEDA tag is added.
TAG_REMOVEDA tag is removed.
CHECKLIST_ITEM_MARKED_AS_DONEA checklist item is checked.
CHECKLIST_ITEM_MARKED_AS_UNDONEA checklist item is unchecked.
DUE_DATE_EXPIREDA record’s due date passes (uses metadata.offset).
TODO_COPIED_OR_MOVED_FROM_OTHER_PROJECTA record is copied or moved in from another workspace.
CUSTOM_FIELD_ADDEDA custom-field value is set.
CUSTOM_FIELD_REMOVEDA custom-field value is cleared.
COLOR_ADDEDA color is added.
COLOR_REMOVEDA color is removed.
CUSTOM_FIELD_BUTTON_CLICKEDA button custom field is clicked.
PROJECT_ADDED_TO_TODOA record is added to a workspace.
SCHEDULEDA schedule elapses (requires schedule).
CONDITIONALA record starts or stops matching a filter (uses conditionMode).

AutomationActionType

ValueAction
CHANGE_TODO_LISTMove the record to todoListId.
MARK_AS_COMPLETEComplete the record.
MARK_AS_INCOMPLETEReopen the record.
ADD_ASSIGNEEAdd assigneeIds.
REMOVE_ASSIGNEERemove assigneeIds.
CHANGE_DUE_DATESet the due date duedIn days out.
REMOVE_DUE_DATEClear the due date.
ADD_TAGAdd tagIds.
REMOVE_TAGRemove tagIds.
MARK_CHECKLIST_ITEM_AS_DONECheck matching checklist items.
MARK_CHECKLIST_ITEM_AS_UNDONEUncheck matching checklist items.
CREATE_CHECKLISTCreate checklists from metadata.checklists.
COPY_TODOCopy the record using metadata.copyTodoOptions.
SEND_EMAILSend the email in metadata.email.
ADD_CUSTOM_FIELDSet a custom-field value.
REMOVE_CUSTOM_FIELDClear a custom-field value.
ADD_COLORApply color.
REMOVE_COLORRemove the color.
GENERATE_PDFGenerate a PDF from portableDocumentId.
MAKE_HTTP_REQUESTCall an external URL via httpOption.
ADD_ASSIGNEE_TRIGGERERAssign the user who fired the trigger.
REMOVE_ASSIGNEE_TRIGGERERUnassign the user who fired the trigger.
ARCHIVE_TODOArchive the record (removes it from the board).
ADD_PROJECTAdd the record to projectIds.

AutomationScheduleType

ValueMeaning
DAILYEvery day at hour:minute.
WEEKLYOn the given dayOfWeek each week.
WEEKDAYSMonday through Friday.
MONTHLYOn dayOfMonth each month.
YEARLYOn dayOfMonth of month each year.
CUSTOMOn a cronExpression.

CopyRecordOption

What to carry over when a COPY_TODO action runs: DESCRIPTION, DUE_DATE, ASSIGNEES, TAGS, COMMENTS, CHECKLISTS, CUSTOM_FIELDS.

Response

createAutomation returns the created Automation. The example above resolves to:

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

Returns

FieldTypeDescription
idID!Unique identifier for the automation.
triggerAutomationTrigger!The configured trigger.
actions[AutomationAction!]!The configured actions.
isActiveBoolean!Whether the automation is active. New automations are active.
createdByUser!The user who created the automation.
projectWorkspace!The workspace the automation belongs to.
createdAtDateTime!Creation timestamp.
updatedAtDateTime!Last update timestamp.

Full example

A TODO_LIST_CHANGED trigger scoped to one list, with four actions: set a due date, add assignees, send an email, and call a webhook. Note contentType: JSON, authorizationType: BEARER, and the required email fields (to, subject, content).

mutation CreateAutomationAdvanced {
  createAutomation(
    input: {
      trigger: {
        type: TODO_LIST_CHANGED
        todoListId: "list_123"
        tagIds: ["tag_123"]
        assigneeIds: ["user_123"]
        color: "#FF5733"
      }
      actions: [
        { type: CHANGE_DUE_DATE, duedIn: 7 }
        { type: ADD_ASSIGNEE, assigneeIds: ["user_123", "user_456"] }
        {
          type: SEND_EMAIL
          metadata: {
            email: {
              to: ["team@example.com"]
              subject: "Record moved to In Progress"
              content: "<p>A record has been moved.</p>"
              cc: ["manager@example.com"]
              replyTo: ["ops@example.com"]
            }
          }
        }
        {
          type: MAKE_HTTP_REQUEST
          httpOption: {
            url: "https://api.example.com/webhook"
            method: POST
            contentType: JSON
            body: "{\"event\": \"record_moved\"}"
            headers: [{ key: "X-Custom-Header", value: "automation" }]
            authorizationType: BEARER
            authorizationBearerToken: "YOUR_BEARER_TOKEN"
          }
        }
      ]
    }
  ) {
    id
    isActive
    trigger {
      id
      type
      color
      todoList {
        id
        title
      }
      tags {
        id
        title
      }
      assignees {
        id
        fullName
        email
      }
    }
    actions {
      id
      type
      duedIn
      assignees {
        id
        fullName
      }
      metadata {
        ... on AutomationActionMetadataSendEmail {
          email {
            to
            subject
          }
        }
      }
      httpOption {
        url
        method
        contentType
      }
    }
    createdBy {
      id
      fullName
      email
    }
    createdAt
  }
}

Scheduled automation

A SCHEDULED trigger requires a schedule. This one fires every Monday at 9:00 AM Eastern (dayOfWeek: [1]) and copies the record with its assignees and tags.

mutation CreateScheduledAutomation {
  createAutomation(
    input: {
      trigger: {
        type: SCHEDULED
        schedule: { type: WEEKLY, hour: 9, minute: 0, timezone: "America/New_York", dayOfWeek: [1] }
      }
      actions: [{ type: COPY_TODO, metadata: { copyTodoOptions: [ASSIGNEES, TAGS, CHECKLISTS] } }]
    }
  ) {
    id
    trigger {
      id
      type
      schedule {
        type
        hour
        minute
        timezone
        dayOfWeek
        nextExecutionAt
      }
    }
  }
}

Conditional automation

A CONDITIONAL trigger fires when a record starts (or stops) matching a saved filter. Set conditionMode to STARTS_MATCHING or STOPS_MATCHING. The filter itself lives in the opaque filterGroups/filterGroupLinks payload — build it in the workspace automation UI and read it back; it is not meant to be hand-authored.

mutation CreateConditionalAutomation {
  createAutomation(
    input: {
      trigger: { type: CONDITIONAL, conditionMode: STARTS_MATCHING, op: AND }
      actions: [{ type: ADD_TAG, tagIds: ["tag_123"] }]
    }
  ) {
    id
    trigger {
      id
      type
      conditionMode
      op
    }
  }
}

Due-date automation

A DUE_DATE_EXPIRED trigger fires when a record’s due date passes. metadata.offset shifts that moment in minutes (negative = before, positive = after); the resolver uses it to schedule the due-date monitoring jobs. This one emails the assignees 60 minutes before the due date, only for incomplete records.

mutation CreateDueDateAutomation {
  createAutomation(
    input: {
      trigger: { type: DUE_DATE_EXPIRED, metadata: { offset: -60, incompleteOnly: true } }
      actions: [
        {
          type: SEND_EMAIL
          metadata: {
            email: {
              to: ["owner@example.com"]
              subject: "A record is due in 1 hour"
              content: "<p>Heads up — this record is due soon.</p>"
            }
          }
        }
      ]
    }
  ) {
    id
    trigger {
      id
      type
      metadata {
        ... on AutomationTriggerMetadataRecordOverdue {
          offset
          incompleteOnly
        }
      }
    }
  }
}

Errors

CodeWhen
UNAUTHENTICATEDNo valid authentication was provided. Message: You are not authenticated.
FORBIDDENThe user is not an OWNER or ADMIN of the workspace, or the workspace is archived. Message: You are not authorized.
PROJECT_NOT_FOUNDThe blue-workspace-id header is missing or does not resolve. Message: Project was not found.
{
  "errors": [
    {
      "message": "You are not authorized.",
      "extensions": { "code": "FORBIDDEN" }
    }
  ]
}

Permissions

Only OWNER and ADMIN members of an active workspace can create automations. MEMBER and CLIENT cannot, and any role is blocked on an archived workspace.