Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create Automation
client.automations.create(AutomationCreateParamsbody?, RequestOptionsoptions?): automationAutomationAutomationCreateResponse
post/api/v1/automations

Invokes the c1.api.automations.v1.AutomationService.CreateAutomation method.

Parameters
bodyappIdstringautomationStepsunioncontextAutomationContextdescriptionstringdisplayNamestringdraftAutomationStepsuniondraftTriggersunionenabledbooleanisDraftbooleantriggersunionAutomationCreateParams
Hide ParametersShow Parameters
appIdstring
optional

the app id this workflow_template belongs to

automationStepsunion
optional
Array<connectorActionunionconnectorCreateAccountunioncreateAccessReviewunioncreateRevokeTasksunionremoveFromDelegationunionrunAutomationunionsendEmailunionskipIfTrueCelstringstepDisplayNamestringstepNamestringtaskActionunionunenrollFromAllAccessProfilesunionupdateUserunionwaitForDurationunionwebhookunionAutomationStep> | null

The automationSteps field.

Hide ParametersShow Parameters
connectorActionunion
optional
actionNamestringargsTemplateRecord<string, unknown>connectorRefunionConnectorAction | null

The ConnectorAction message.

This message contains a oneof named connector_identifier. Only a single field of the following list may be set at a time:

  • connectorRef
Hide ParametersShow Parameters
actionNamestring
optional

The actionName field.

argsTemplateRecord<string, unknown>
optional
connectorRefunion
optional
idstringappIdstringConnectorRef | null

The ConnectorRef message.

connectorCreateAccountunion
optional
connectorRefunionuserIdCelunionuserPropertiesunionConnectorCreateAccount | null

The ConnectorCreateAccount message.

This message contains a oneof named create_account_arguments. Only a single field of the following list may be set at a time:

  • userIdCel
  • userProperties
Hide ParametersShow Parameters
connectorRefunion
optional
idstringappIdstringConnectorRef | null

The ConnectorRef message.

userIdCelunion
optional
string | null

The userIdCel field. This field is part of the create_account_arguments oneof. See the documentation for c1.api.automations.v1.ConnectorCreateAccount for more details.

userPropertiesunion
optional
displayNameCelstringemailCelstringprofileAttributeCelstringusernameCelstringUserProperties | null

The UserProperties message.

Hide ParametersShow Parameters
displayNameCelstring
optional

The displayNameCel field.

emailCelstring
optional

The emailCel field.

profileAttributeCelstring
optional

The profileAttributeCel field.

usernameCelstring
optional

The usernameCel field.

createAccessReviewunion
optional
accessReviewTemplateCelstringaccessReviewTemplateIdstringuserIdsCelstringuserRefsunionuseSubjectUserbooleanCreateAccessReview | null

The CreateAccessReview message.

Hide ParametersShow Parameters
accessReviewTemplateCelstring
optional

The accessReviewTemplateCel field.

accessReviewTemplateIdstring
optional

The accessReviewTemplateId field.

userIdsCelstring
optional

The userIdsCel field.

userRefsunion
optional
Array<idstringUserRef> | null

The userRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

createRevokeTasksunion
optional
appEntitlementRefsunionappEntitlementRefsCelstringrevokeAllbooleanuserIdCelstringuserRefUserRefuseSubjectUserbooleanCreateRevokeTasks | null

The CreateRevokeTasks message.

Hide ParametersShow Parameters
appEntitlementRefsunion
optional
Array<idstringappIdstringAppEntitlementRef> | null

The appEntitlementRefs field.

Hide ParametersShow Parameters
idstring
optional

The id field.

appIdstring
optional

The appId field.

appEntitlementRefsCelstring
optional

The appEntitlementRefsCel field.

revokeAllboolean
optional

The revokeAll field.

userIdCelstring
optional

The userIdCel field.

userRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

removeFromDelegationunion
optional
replacementUserIdCelunionreplacementUserRefUserRefuserIdCelstringuserRefUserRefuseSubjectUserbooleanRemoveFromDelegation | null

RemoveFromDelegation: find all users that have the target user as their delegated user, and modify the delegation.

This message contains a oneof named replacement_user. Only a single field of the following list may be set at a time:

  • replacementUserIdCel
  • replacementUserRef
Hide ParametersShow Parameters
replacementUserIdCelunion
optional
string | null

The user who will replace the target user's delegation This field is part of the replacement_user oneof. See the documentation for c1.api.automations.v1.RemoveFromDelegation for more details.

replacementUserRefidstringUserRef
optional

A reference to a user.

userIdCelstring
optional

The userIdCel field.

userRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

runAutomationunion
optional
automationTemplateIdCelunionautomationTemplateRefunioncontextAutomationContextRunAutomation | null

RunAutomation: kick off the execution of an automation template.

This message contains a oneof named automation_template. Only a single field of the following list may be set at a time:

  • automationTemplateRef
  • automationTemplateIdCel
Hide ParametersShow Parameters
automationTemplateIdCelunion
optional
string | null

The automationTemplateIdCel field. This field is part of the automation_template oneof. See the documentation for c1.api.automations.v1.RunAutomation for more details.

automationTemplateRefunion
optional
idstringAutomationTemplateRef | null

The AutomationTemplateRef message.

contextcontextRecord<string, unknown>AutomationContext
optional

The AutomationContext message.

sendEmailunion
optional
bodystringsubjectstringtitlestringuserIdsCelstringuserRefsunionuseSubjectUserbooleanSendEmail | null

The SendEmail message.

Hide ParametersShow Parameters
bodystring
optional

The body field.

subjectstring
optional

The subject field.

titlestring
optional

The title field.

userIdsCelstring
optional

The userIdsCel field.

userRefsunion
optional
Array<idstringUserRef> | null

The userRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

skipIfTrueCelstring
optional

The skipIfTrueCel field.

stepDisplayNamestring
optional

The stepDisplayName field.

stepNamestring
optional

The stepName field.

taskActionunion
optional
closeunionreassignuniontaskTypesunionTaskAction | null

The TaskAction message.

This message contains a oneof named action. Only a single field of the following list may be set at a time:

  • close
  • reassign
Hide ParametersShow Parameters
closeunion
optional
userIdCelunionuserRefUserRefuseSubjectUserbooleanClose | null

The CloseAction message.

This message contains a oneof named user_identifier. Only a single field of the following list may be set at a time:

  • userIdCel
  • userRef
Hide ParametersShow Parameters
userIdCelunion
optional
string | null

The userIdCel field. This field is part of the user_identifier oneof. See the documentation for c1.api.automations.v1.CloseAction for more details.

userRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

reassignunion
optional
assigneeUserIdCelunionassigneeUserRefUserRefsubjectUserIdCelunionsubjectUserRefUserRefuseSubjectUserbooleanReassign | null

The ReassignAction message.

This message contains a oneof named assignee_user_identifier. Only a single field of the following list may be set at a time:

  • assigneeUserIdCel
  • assigneeUserRef

This message contains a oneof named subject_user_identifier. Only a single field of the following list may be set at a time:

  • subjectUserIdCel
  • subjectUserRef
Hide ParametersShow Parameters
assigneeUserIdCelunion
optional
string | null

The assigneeUserIdCel field. This field is part of the assignee_user_identifier oneof. See the documentation for c1.api.automations.v1.ReassignAction for more details.

assigneeUserRefidstringUserRef
optional

A reference to a user.

subjectUserIdCelunion
optional
string | null

The subjectUserIdCel field. This field is part of the subject_user_identifier oneof. See the documentation for c1.api.automations.v1.ReassignAction for more details.

subjectUserRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

taskTypesunion
optional
Array<"TASK_TYPE_UNSPECIFIED" | "TASK_TYPE_REQUEST" | "TASK_TYPE_REVOKE" | "TASK_TYPE_REVIEW"> | null

The taskTypes field.

Hide ParametersShow Parameters
"TASK_TYPE_UNSPECIFIED"
"TASK_TYPE_REQUEST"
"TASK_TYPE_REVOKE"
"TASK_TYPE_REVIEW"
unenrollFromAllAccessProfilesunion
optional
catalogIdsunioncatalogIdsCelstringuserIdsCelstringuserRefsunionuseSubjectUserbooleanUnenrollFromAllAccessProfiles | null

The UnenrollFromAllAccessProfiles message.

Hide ParametersShow Parameters
catalogIdsunion
optional
Array<string> | null

Optional list of catalog IDs to unenroll from. If empty, unenroll from all catalogs.

catalogIdsCelstring
optional

CEL expression to dynamically select catalog IDs. If provided, overrides catalog_ids.

userIdsCelstring
optional

The userIdsCel field.

userRefsunion
optional
Array<idstringUserRef> | null

The userRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

updateUserunion
optional
userIdCelunionuserRefUserRefuserStatusCelunionuserStatusEnumunionuseSubjectUserbooleanUpdateUser | null

The UpdateUser message.

This message contains a oneof named user. Only a single field of the following list may be set at a time:

  • userIdCel
  • userRef

This message contains a oneof named user_status. Only a single field of the following list may be set at a time:

  • userStatusEnum
  • userStatusCel
Hide ParametersShow Parameters
userIdCelunion
optional
string | null

The userIdCel field. This field is part of the user oneof. See the documentation for c1.api.automations.v1.UpdateUser for more details.

userRefidstringUserRef
optional

A reference to a user.

userStatusCelunion
optional
string | null

The userStatusCel field. This field is part of the user_status oneof. See the documentation for c1.api.automations.v1.UpdateUser for more details.

userStatusEnumunion
optional
"UNKNOWN" | "ENABLED" | "DISABLED" | "DELETED" | null

The userStatusEnum field. This field is part of the user_status oneof. See the documentation for c1.api.automations.v1.UpdateUser for more details.

Hide ParametersShow Parameters
"UNKNOWN"
"ENABLED"
"DISABLED"
"DELETED"
useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

waitForDurationunion
optional
durationstringWaitForDuration | null

The WaitForDuration message.

Hide ParametersShow Parameters
durationstring
optional
formatduration
webhookunion
optional
payloadRecord<string, unknown>webhookIdunionwebhookIdCelunionWebhook | null

The Webhook message.

This message contains a oneof named webhook_identifier. Only a single field of the following list may be set at a time:

  • webhookId
  • webhookIdCel
Hide ParametersShow Parameters
payloadRecord<string, unknown>
optional
webhookIdunion
optional
string | null

The webhookId field. This field is part of the webhook_identifier oneof. See the documentation for c1.api.automations.v1.Webhook for more details.

webhookIdCelunion
optional
string | null

The webhookIdCel field. This field is part of the webhook_identifier oneof. See the documentation for c1.api.automations.v1.Webhook for more details.

contextcontextRecord<string, unknown>AutomationContext
optional

The AutomationContext message.

descriptionstring
optional

The description field.

displayNamestring
optional

The displayName field.

draftAutomationStepsunion
optional
Array<connectorActionunionconnectorCreateAccountunioncreateAccessReviewunioncreateRevokeTasksunionremoveFromDelegationunionrunAutomationunionsendEmailunionskipIfTrueCelstringstepDisplayNamestringstepNamestringtaskActionunionunenrollFromAllAccessProfilesunionupdateUserunionwaitForDurationunionwebhookunionAutomationStep> | null

The draftAutomationSteps field.

Hide ParametersShow Parameters
connectorActionunion
optional
actionNamestringargsTemplateRecord<string, unknown>connectorRefunionConnectorAction | null

The ConnectorAction message.

This message contains a oneof named connector_identifier. Only a single field of the following list may be set at a time:

  • connectorRef
Hide ParametersShow Parameters
actionNamestring
optional

The actionName field.

argsTemplateRecord<string, unknown>
optional
connectorRefunion
optional
idstringappIdstringConnectorRef | null

The ConnectorRef message.

connectorCreateAccountunion
optional
connectorRefunionuserIdCelunionuserPropertiesunionConnectorCreateAccount | null

The ConnectorCreateAccount message.

This message contains a oneof named create_account_arguments. Only a single field of the following list may be set at a time:

  • userIdCel
  • userProperties
Hide ParametersShow Parameters
connectorRefunion
optional
idstringappIdstringConnectorRef | null

The ConnectorRef message.

userIdCelunion
optional
string | null

The userIdCel field. This field is part of the create_account_arguments oneof. See the documentation for c1.api.automations.v1.ConnectorCreateAccount for more details.

userPropertiesunion
optional
displayNameCelstringemailCelstringprofileAttributeCelstringusernameCelstringUserProperties | null

The UserProperties message.

Hide ParametersShow Parameters
displayNameCelstring
optional

The displayNameCel field.

emailCelstring
optional

The emailCel field.

profileAttributeCelstring
optional

The profileAttributeCel field.

usernameCelstring
optional

The usernameCel field.

createAccessReviewunion
optional
accessReviewTemplateCelstringaccessReviewTemplateIdstringuserIdsCelstringuserRefsunionuseSubjectUserbooleanCreateAccessReview | null

The CreateAccessReview message.

Hide ParametersShow Parameters
accessReviewTemplateCelstring
optional

The accessReviewTemplateCel field.

accessReviewTemplateIdstring
optional

The accessReviewTemplateId field.

userIdsCelstring
optional

The userIdsCel field.

userRefsunion
optional
Array<idstringUserRef> | null

The userRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

createRevokeTasksunion
optional
appEntitlementRefsunionappEntitlementRefsCelstringrevokeAllbooleanuserIdCelstringuserRefUserRefuseSubjectUserbooleanCreateRevokeTasks | null

The CreateRevokeTasks message.

Hide ParametersShow Parameters
appEntitlementRefsunion
optional
Array<idstringappIdstringAppEntitlementRef> | null

The appEntitlementRefs field.

Hide ParametersShow Parameters
idstring
optional

The id field.

appIdstring
optional

The appId field.

appEntitlementRefsCelstring
optional

The appEntitlementRefsCel field.

revokeAllboolean
optional

The revokeAll field.

userIdCelstring
optional

The userIdCel field.

userRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

removeFromDelegationunion
optional
replacementUserIdCelunionreplacementUserRefUserRefuserIdCelstringuserRefUserRefuseSubjectUserbooleanRemoveFromDelegation | null

RemoveFromDelegation: find all users that have the target user as their delegated user, and modify the delegation.

This message contains a oneof named replacement_user. Only a single field of the following list may be set at a time:

  • replacementUserIdCel
  • replacementUserRef
Hide ParametersShow Parameters
replacementUserIdCelunion
optional
string | null

The user who will replace the target user's delegation This field is part of the replacement_user oneof. See the documentation for c1.api.automations.v1.RemoveFromDelegation for more details.

replacementUserRefidstringUserRef
optional

A reference to a user.

userIdCelstring
optional

The userIdCel field.

userRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

runAutomationunion
optional
automationTemplateIdCelunionautomationTemplateRefunioncontextAutomationContextRunAutomation | null

RunAutomation: kick off the execution of an automation template.

This message contains a oneof named automation_template. Only a single field of the following list may be set at a time:

  • automationTemplateRef
  • automationTemplateIdCel
Hide ParametersShow Parameters
automationTemplateIdCelunion
optional
string | null

The automationTemplateIdCel field. This field is part of the automation_template oneof. See the documentation for c1.api.automations.v1.RunAutomation for more details.

automationTemplateRefunion
optional
idstringAutomationTemplateRef | null

The AutomationTemplateRef message.

contextcontextRecord<string, unknown>AutomationContext
optional

The AutomationContext message.

sendEmailunion
optional
bodystringsubjectstringtitlestringuserIdsCelstringuserRefsunionuseSubjectUserbooleanSendEmail | null

The SendEmail message.

Hide ParametersShow Parameters
bodystring
optional

The body field.

subjectstring
optional

The subject field.

titlestring
optional

The title field.

userIdsCelstring
optional

The userIdsCel field.

userRefsunion
optional
Array<idstringUserRef> | null

The userRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

skipIfTrueCelstring
optional

The skipIfTrueCel field.

stepDisplayNamestring
optional

The stepDisplayName field.

stepNamestring
optional

The stepName field.

taskActionunion
optional
closeunionreassignuniontaskTypesunionTaskAction | null

The TaskAction message.

This message contains a oneof named action. Only a single field of the following list may be set at a time:

  • close
  • reassign
Hide ParametersShow Parameters
closeunion
optional
userIdCelunionuserRefUserRefuseSubjectUserbooleanClose | null

The CloseAction message.

This message contains a oneof named user_identifier. Only a single field of the following list may be set at a time:

  • userIdCel
  • userRef
Hide ParametersShow Parameters
userIdCelunion
optional
string | null

The userIdCel field. This field is part of the user_identifier oneof. See the documentation for c1.api.automations.v1.CloseAction for more details.

userRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

reassignunion
optional
assigneeUserIdCelunionassigneeUserRefUserRefsubjectUserIdCelunionsubjectUserRefUserRefuseSubjectUserbooleanReassign | null

The ReassignAction message.

This message contains a oneof named assignee_user_identifier. Only a single field of the following list may be set at a time:

  • assigneeUserIdCel
  • assigneeUserRef

This message contains a oneof named subject_user_identifier. Only a single field of the following list may be set at a time:

  • subjectUserIdCel
  • subjectUserRef
Hide ParametersShow Parameters
assigneeUserIdCelunion
optional
string | null

The assigneeUserIdCel field. This field is part of the assignee_user_identifier oneof. See the documentation for c1.api.automations.v1.ReassignAction for more details.

assigneeUserRefidstringUserRef
optional

A reference to a user.

subjectUserIdCelunion
optional
string | null

The subjectUserIdCel field. This field is part of the subject_user_identifier oneof. See the documentation for c1.api.automations.v1.ReassignAction for more details.

subjectUserRefidstringUserRef
optional

A reference to a user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

taskTypesunion
optional
Array<"TASK_TYPE_UNSPECIFIED" | "TASK_TYPE_REQUEST" | "TASK_TYPE_REVOKE" | "TASK_TYPE_REVIEW"> | null

The taskTypes field.

Hide ParametersShow Parameters
"TASK_TYPE_UNSPECIFIED"
"TASK_TYPE_REQUEST"
"TASK_TYPE_REVOKE"
"TASK_TYPE_REVIEW"
unenrollFromAllAccessProfilesunion
optional
catalogIdsunioncatalogIdsCelstringuserIdsCelstringuserRefsunionuseSubjectUserbooleanUnenrollFromAllAccessProfiles | null

The UnenrollFromAllAccessProfiles message.

Hide ParametersShow Parameters
catalogIdsunion
optional
Array<string> | null

Optional list of catalog IDs to unenroll from. If empty, unenroll from all catalogs.

catalogIdsCelstring
optional

CEL expression to dynamically select catalog IDs. If provided, overrides catalog_ids.

userIdsCelstring
optional

The userIdsCel field.

userRefsunion
optional
Array<idstringUserRef> | null

The userRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

updateUserunion
optional
userIdCelunionuserRefUserRefuserStatusCelunionuserStatusEnumunionuseSubjectUserbooleanUpdateUser | null

The UpdateUser message.

This message contains a oneof named user. Only a single field of the following list may be set at a time:

  • userIdCel
  • userRef

This message contains a oneof named user_status. Only a single field of the following list may be set at a time:

  • userStatusEnum
  • userStatusCel
Hide ParametersShow Parameters
userIdCelunion
optional
string | null

The userIdCel field. This field is part of the user oneof. See the documentation for c1.api.automations.v1.UpdateUser for more details.

userRefidstringUserRef
optional

A reference to a user.

userStatusCelunion
optional
string | null

The userStatusCel field. This field is part of the user_status oneof. See the documentation for c1.api.automations.v1.UpdateUser for more details.

userStatusEnumunion
optional
"UNKNOWN" | "ENABLED" | "DISABLED" | "DELETED" | null

The userStatusEnum field. This field is part of the user_status oneof. See the documentation for c1.api.automations.v1.UpdateUser for more details.

Hide ParametersShow Parameters
"UNKNOWN"
"ENABLED"
"DISABLED"
"DELETED"
useSubjectUserboolean
optional

If true, the step will use the subject user of the automation as the subject.

waitForDurationunion
optional
durationstringWaitForDuration | null

The WaitForDuration message.

Hide ParametersShow Parameters
durationstring
optional
formatduration
webhookunion
optional
payloadRecord<string, unknown>webhookIdunionwebhookIdCelunionWebhook | null

The Webhook message.

This message contains a oneof named webhook_identifier. Only a single field of the following list may be set at a time:

  • webhookId
  • webhookIdCel
Hide ParametersShow Parameters
payloadRecord<string, unknown>
optional
webhookIdunion
optional
string | null

The webhookId field. This field is part of the webhook_identifier oneof. See the documentation for c1.api.automations.v1.Webhook for more details.

webhookIdCelunion
optional
string | null

The webhookIdCel field. This field is part of the webhook_identifier oneof. See the documentation for c1.api.automations.v1.Webhook for more details.

draftTriggersunion
optional
Array<appUserCreatedunionappUserUpdatedunionconditionstringmanualunknownusageBasedRevocationunionuserProfileChangeunionAutomationTrigger> | null

The draftTriggers field.

Hide ParametersShow Parameters
appUserCreatedunion
optional
appIdunionappIdCelunionAppUserCreated | null

The AppUserCreatedTrigger message.

This message contains a oneof named app_identifier. Only a single field of the following list may be set at a time:

  • appId
  • appIdCel
Hide ParametersShow Parameters
appIdunion
optional
string | null

The appId field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserCreatedTrigger for more details.

appIdCelunion
optional
string | null

The appIdCel field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserCreatedTrigger for more details.

appUserUpdatedunion
optional
appIdunionappIdCelunionAppUserUpdated | null

The AppUserUpdatedTrigger message.

This message contains a oneof named app_identifier. Only a single field of the following list may be set at a time:

  • appId
  • appIdCel
Hide ParametersShow Parameters
appIdunion
optional
string | null

The appId field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserUpdatedTrigger for more details.

appIdCelunion
optional
string | null

The appIdCel field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserUpdatedTrigger for more details.

conditionstring
optional

The condition field.

manualunknown
optional

The ManualAutomationTrigger message.

usageBasedRevocationunion
optional
appIdstringenabledAtstringexcludedGroupRefsunionexcludedUserRefsunionincludeUsersWithNoActivitybooleanrunDelayedunionrunImmediatelyunknowntargetedAppUserTypesuniontargetedEntitlementRefsunionunusedForDaysnumberUsageBasedRevocation | null

The UsageBasedRevocationTrigger message.

This message contains a oneof named cold_start_schedule. Only a single field of the following list may be set at a time:

  • runImmediately
  • runDelayed
Hide ParametersShow Parameters
appIdstring
optional

The appId field.

enabledAtstring
optional
formatdate-time
excludedGroupRefsunion
optional
Array<idstringappIdstringAppEntitlementRef> | null

The excludedGroupRefs field.

Hide ParametersShow Parameters
idstring
optional

The id field.

appIdstring
optional

The appId field.

excludedUserRefsunion
optional
Array<idstringUserRef> | null

The excludedUserRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

includeUsersWithNoActivityboolean
optional

The includeUsersWithNoActivity field.

runDelayedunion
optional
coldStartDelayDaysnumberRunDelayed | null

The RunDelayed message.

Hide ParametersShow Parameters
coldStartDelayDaysnumber

The coldStartDelayDays field.

formatuint32
runImmediatelyunknown
optional

No fields needed; this just indicates the trigger should run immediately

targetedAppUserTypesunion
optional
Array<"APP_USER_TYPE_UNSPECIFIED" | "APP_USER_TYPE_USER" | "APP_USER_TYPE_SERVICE_ACCOUNT" | "APP_USER_TYPE_SYSTEM_ACCOUNT"> | null

The targetedAppUserTypes field.

Hide ParametersShow Parameters
"APP_USER_TYPE_UNSPECIFIED"
"APP_USER_TYPE_USER"
"APP_USER_TYPE_SERVICE_ACCOUNT"
"APP_USER_TYPE_SYSTEM_ACCOUNT"
targetedEntitlementRefsunion
optional
Array<idstringappIdstringAppEntitlementRef> | null

The targetedEntitlementRefs field.

Hide ParametersShow Parameters
idstring
optional

The id field.

appIdstring
optional

The appId field.

unusedForDaysnumber
optional

The unusedForDays field.

formatuint32
userProfileChangeunion
optional
profileAttributeCelstringprofileAttributeKeystringUserProfileChange | null

The UserProfileChangeTrigger message.

Hide ParametersShow Parameters
profileAttributeCelstring
optional

The profileAttributeCel field.

profileAttributeKeystring
optional

The profileAttributeKey field.

enabledboolean
optional

The enabled field.

isDraftboolean
optional

The isDraft field.

triggersunion
optional
Array<appUserCreatedunionappUserUpdatedunionconditionstringmanualunknownusageBasedRevocationunionuserProfileChangeunionAutomationTrigger> | null

The triggers field.

Hide ParametersShow Parameters
appUserCreatedunion
optional
appIdunionappIdCelunionAppUserCreated | null

The AppUserCreatedTrigger message.

This message contains a oneof named app_identifier. Only a single field of the following list may be set at a time:

  • appId
  • appIdCel
Hide ParametersShow Parameters
appIdunion
optional
string | null

The appId field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserCreatedTrigger for more details.

appIdCelunion
optional
string | null

The appIdCel field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserCreatedTrigger for more details.

appUserUpdatedunion
optional
appIdunionappIdCelunionAppUserUpdated | null

The AppUserUpdatedTrigger message.

This message contains a oneof named app_identifier. Only a single field of the following list may be set at a time:

  • appId
  • appIdCel
Hide ParametersShow Parameters
appIdunion
optional
string | null

The appId field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserUpdatedTrigger for more details.

appIdCelunion
optional
string | null

The appIdCel field. This field is part of the app_identifier oneof. See the documentation for c1.api.automations.v1.AppUserUpdatedTrigger for more details.

conditionstring
optional

The condition field.

manualunknown
optional

The ManualAutomationTrigger message.

usageBasedRevocationunion
optional
appIdstringenabledAtstringexcludedGroupRefsunionexcludedUserRefsunionincludeUsersWithNoActivitybooleanrunDelayedunionrunImmediatelyunknowntargetedAppUserTypesuniontargetedEntitlementRefsunionunusedForDaysnumberUsageBasedRevocation | null

The UsageBasedRevocationTrigger message.

This message contains a oneof named cold_start_schedule. Only a single field of the following list may be set at a time:

  • runImmediately
  • runDelayed
Hide ParametersShow Parameters
appIdstring
optional

The appId field.

enabledAtstring
optional
formatdate-time
excludedGroupRefsunion
optional
Array<idstringappIdstringAppEntitlementRef> | null

The excludedGroupRefs field.

Hide ParametersShow Parameters
idstring
optional

The id field.

appIdstring
optional

The appId field.

excludedUserRefsunion
optional
Array<idstringUserRef> | null

The excludedUserRefs field.

Hide ParametersShow Parameters
idstring
optional

The id of the user.

includeUsersWithNoActivityboolean
optional

The includeUsersWithNoActivity field.

runDelayedunion
optional
coldStartDelayDaysnumberRunDelayed | null

The RunDelayed message.

Hide ParametersShow Parameters
coldStartDelayDaysnumber

The coldStartDelayDays field.

formatuint32
runImmediatelyunknown
optional

No fields needed; this just indicates the trigger should run immediately

targetedAppUserTypesunion
optional
Array<"APP_USER_TYPE_UNSPECIFIED" | "APP_USER_TYPE_USER" | "APP_USER_TYPE_SERVICE_ACCOUNT" | "APP_USER_TYPE_SYSTEM_ACCOUNT"> | null

The targetedAppUserTypes field.

Hide ParametersShow Parameters
"APP_USER_TYPE_UNSPECIFIED"
"APP_USER_TYPE_USER"
"APP_USER_TYPE_SERVICE_ACCOUNT"
"APP_USER_TYPE_SYSTEM_ACCOUNT"
targetedEntitlementRefsunion
optional
Array<idstringappIdstringAppEntitlementRef> | null

The targetedEntitlementRefs field.

Hide ParametersShow Parameters
idstring
optional

The id field.

appIdstring
optional

The appId field.

unusedForDaysnumber
optional

The unusedForDays field.

formatuint32
userProfileChangeunion
optional
profileAttributeCelstringprofileAttributeKeystringUserProfileChange | null

The UserProfileChangeTrigger message.

Hide ParametersShow Parameters
profileAttributeCelstring
optional

The profileAttributeCel field.

profileAttributeKeystring
optional

The profileAttributeKey field.

Returns
AutomationCreateResponse

The CreateAutomationResponse message.

Hide ParametersShow Parameters
automationidstringappIdstringautomationStepsunioncontextAutomationContextcreatedAtstringcurrentVersionstringdescriptionstringdisplayNamestringdraftAutomationStepsuniondraftTriggersunionenabledbooleanisDraftbooleanlastExecutedAtstringtriggersunionAutomation
optional

The Automation message.

Request example TypeScript
import ConductoroneSDK from 'conductorone-sdk';

const client = new ConductoroneSDK({
  apiKey: 'My API Key',
});

const automation = await client.automations.create();

console.log(automation.automation);
200 Example
{
  "automation": {
    "appId": "appId",
    "automationSteps": [
      {
        "connectorAction": {
          "actionName": "actionName",
          "argsTemplate": {
            "foo": "bar"
          },
          "connectorRef": {
            "id": "id",
            "appId": "appId"
          }
        },
        "connectorCreateAccount": {
          "connectorRef": {
            "id": "id",
            "appId": "appId"
          },
          "userIdCel": "userIdCel",
          "userProperties": {
            "displayNameCel": "displayNameCel",
            "emailCel": "emailCel",
            "profileAttributeCel": "profileAttributeCel",
            "usernameCel": "usernameCel"
          }
        },
        "createAccessReview": {
          "accessReviewTemplateCel": "accessReviewTemplateCel",
          "accessReviewTemplateId": "accessReviewTemplateId",
          "userIdsCel": "userIdsCel",
          "userRefs": [
            {
              "id": "id"
            }
          ],
          "useSubjectUser": true
        },
        "createRevokeTasks": {
          "appEntitlementRefs": [
            {
              "id": "id",
              "appId": "appId"
            }
          ],
          "appEntitlementRefsCel": "appEntitlementRefsCel",
          "revokeAll": true,
          "userIdCel": "userIdCel",
          "userRef": {
            "id": "id"
          },
          "useSubjectUser": true
        },
        "removeFromDelegation": {
          "replacementUserIdCel": "replacementUserIdCel",
          "replacementUserRef": {
            "id": "id"
          },
          "userIdCel": "userIdCel",
          "userRef": {
            "id": "id"
          },
          "useSubjectUser": true
        },
        "runAutomation": {
          "automationTemplateIdCel": "automationTemplateIdCel",
          "automationTemplateRef": {
            "id": "id"
          },
          "context": {
            "context": {
              "foo": "bar"
            }
          }
        },
        "sendEmail": {
          "body": "body",
          "subject": "subject",
          "title": "title",
          "userIdsCel": "userIdsCel",
          "userRefs": [
            {
              "id": "id"
            }
          ],
          "useSubjectUser": true
        },
        "skipIfTrueCel": "skipIfTrueCel",
        "stepDisplayName": "stepDisplayName",
        "stepName": "stepName",
        "taskAction": {
          "close": {
            "userIdCel": "userIdCel",
            "userRef": {
              "id": "id"
            },
            "useSubjectUser": true
          },
          "reassign": {
            "assigneeUserIdCel": "assigneeUserIdCel",
            "assigneeUserRef": {
              "id": "id"
            },
            "subjectUserIdCel": "subjectUserIdCel",
            "subjectUserRef": {
              "id": "id"
            },
            "useSubjectUser": true
          },
          "taskTypes": [
            "TASK_TYPE_UNSPECIFIED"
          ]
        },
        "unenrollFromAllAccessProfiles": {
          "catalogIds": [
            "string"
          ],
          "catalogIdsCel": "catalogIdsCel",
          "userIdsCel": "userIdsCel",
          "userRefs": [
            {
              "id": "id"
            }
          ],
          "useSubjectUser": true
        },
        "updateUser": {
          "userIdCel": "userIdCel",
          "userRef": {
            "id": "id"
          },
          "userStatusCel": "userStatusCel",
          "userStatusEnum": "UNKNOWN",
          "useSubjectUser": true
        },
        "waitForDuration": {
          "duration": "duration"
        },
        "webhook": {
          "payload": {
            "foo": "bar"
          },
          "webhookId": "webhookId",
          "webhookIdCel": "webhookIdCel"
        }
      }
    ],
    "context": {
      "context": {
        "foo": "bar"
      }
    },
    "createdAt": "2019-12-27T18:11:19.117Z",
    "currentVersion": "currentVersion",
    "description": "description",
    "displayName": "displayName",
    "draftAutomationSteps": [
      {
        "connectorAction": {
          "actionName": "actionName",
          "argsTemplate": {
            "foo": "bar"
          },
          "connectorRef": {
            "id": "id",
            "appId": "appId"
          }
        },
        "connectorCreateAccount": {
          "connectorRef": {
            "id": "id",
            "appId": "appId"
          },
          "userIdCel": "userIdCel",
          "userProperties": {
            "displayNameCel": "displayNameCel",
            "emailCel": "emailCel",
            "profileAttributeCel": "profileAttributeCel",
            "usernameCel": "usernameCel"
          }
        },
        "createAccessReview": {
          "accessReviewTemplateCel": "accessReviewTemplateCel",
          "accessReviewTemplateId": "accessReviewTemplateId",
          "userIdsCel": "userIdsCel",
          "userRefs": [
            {
              "id": "id"
            }
          ],
          "useSubjectUser": true
        },
        "createRevokeTasks": {
          "appEntitlementRefs": [
            {
              "id": "id",
              "appId": "appId"
            }
          ],
          "appEntitlementRefsCel": "appEntitlementRefsCel",
          "revokeAll": true,
          "userIdCel": "userIdCel",
          "userRef": {
            "id": "id"
          },
          "useSubjectUser": true
        },
        "removeFromDelegation": {
          "replacementUserIdCel": "replacementUserIdCel",
          "replacementUserRef": {
            "id": "id"
          },
          "userIdCel": "userIdCel",
          "userRef": {
            "id": "id"
          },
          "useSubjectUser": true
        },
        "runAutomation": {
          "automationTemplateIdCel": "automationTemplateIdCel",
          "automationTemplateRef": {
            "id": "id"
          },
          "context": {
            "context": {
              "foo": "bar"
            }
          }
        },
        "sendEmail": {
          "body": "body",
          "subject": "subject",
          "title": "title",
          "userIdsCel": "userIdsCel",
          "userRefs": [
            {
              "id": "id"
            }
          ],
          "useSubjectUser": true
        },
        "skipIfTrueCel": "skipIfTrueCel",
        "stepDisplayName": "stepDisplayName",
        "stepName": "stepName",
        "taskAction": {
          "close": {
            "userIdCel": "userIdCel",
            "userRef": {
              "id": "id"
            },
            "useSubjectUser": true
          },
          "reassign": {
            "assigneeUserIdCel": "assigneeUserIdCel",
            "assigneeUserRef": {
              "id": "id"
            },
            "subjectUserIdCel": "subjectUserIdCel",
            "subjectUserRef": {
              "id": "id"
            },
            "useSubjectUser": true
          },
          "taskTypes": [
            "TASK_TYPE_UNSPECIFIED"
          ]
        },
        "unenrollFromAllAccessProfiles": {
          "catalogIds": [
            "string"
          ],
          "catalogIdsCel": "catalogIdsCel",
          "userIdsCel": "userIdsCel",
          "userRefs": [
            {
              "id": "id"
            }
          ],
          "useSubjectUser": true
        },
        "updateUser": {
          "userIdCel": "userIdCel",
          "userRef": {
            "id": "id"
          },
          "userStatusCel": "userStatusCel",
          "userStatusEnum": "UNKNOWN",
          "useSubjectUser": true
        },
        "waitForDuration": {
          "duration": "duration"
        },
        "webhook": {
          "payload": {
            "foo": "bar"
          },
          "webhookId": "webhookId",
          "webhookIdCel": "webhookIdCel"
        }
      }
    ],
    "draftTriggers": [
      {
        "appUserCreated": {
          "appId": "appId",
          "appIdCel": "appIdCel"
        },
        "appUserUpdated": {
          "appId": "appId",
          "appIdCel": "appIdCel"
        },
        "condition": "condition",
        "manual": {},
        "usageBasedRevocation": {
          "appId": "appId",
          "enabledAt": "2019-12-27T18:11:19.117Z",
          "excludedGroupRefs": [
            {
              "id": "id",
              "appId": "appId"
            }
          ],
          "excludedUserRefs": [
            {
              "id": "id"
            }
          ],
          "includeUsersWithNoActivity": true,
          "runDelayed": {
            "coldStartDelayDays": 0
          },
          "runImmediately": {},
          "targetedAppUserTypes": [
            "APP_USER_TYPE_UNSPECIFIED"
          ],
          "targetedEntitlementRefs": [
            {
              "id": "id",
              "appId": "appId"
            }
          ],
          "unusedForDays": 0
        },
        "userProfileChange": {
          "profileAttributeCel": "profileAttributeCel",
          "profileAttributeKey": "profileAttributeKey"
        }
      }
    ],
    "enabled": true,
    "isDraft": true,
    "lastExecutedAt": "2019-12-27T18:11:19.117Z",
    "triggers": [
      {
        "appUserCreated": {
          "appId": "appId",
          "appIdCel": "appIdCel"
        },
        "appUserUpdated": {
          "appId": "appId",
          "appIdCel": "appIdCel"
        },
        "condition": "condition",
        "manual": {},
        "usageBasedRevocation": {
          "appId": "appId",
          "enabledAt": "2019-12-27T18:11:19.117Z",
          "excludedGroupRefs": [
            {
              "id": "id",
              "appId": "appId"
            }
          ],
          "excludedUserRefs": [
            {
              "id": "id"
            }
          ],
          "includeUsersWithNoActivity": true,
          "runDelayed": {
            "coldStartDelayDays": 0
          },
          "runImmediately": {},
          "targetedAppUserTypes": [
            "APP_USER_TYPE_UNSPECIFIED"
          ],
          "targetedEntitlementRefs": [
            {
              "id": "id",
              "appId": "appId"
            }
          ],
          "unusedForDays": 0
        },
        "userProfileChange": {
          "profileAttributeCel": "profileAttributeCel",
          "profileAttributeKey": "profileAttributeKey"
        }
      }
    ]
  }
}