Skip to content
Go to Micro

Triggered Automations

Create a triggered automation (state + changeset filter trees)
client.TriggeredAutomations.New(ctx, automationObjectType, params) (*TriggeredAutomation, error)
POST/v2/prism/{teamId}/{automationObjectType}/triggered_automations
List triggered automations for an owner
client.TriggeredAutomations.List(ctx, automationObjectType, params) (*TriggeredAutomationListResponse, error)
GET/v2/prism/{teamId}/{automationObjectType}/triggered_automations
Read a triggered automation
client.TriggeredAutomations.Get(ctx, automationObjectType, automationID, query) (*TriggeredAutomation, error)
GET/v2/prism/{teamId}/{automationObjectType}/triggered_automations/{automationId}
Replace a triggered automation (idempotent full write of the whole tree)
client.TriggeredAutomations.Update(ctx, automationObjectType, automationID, params) (*TriggeredAutomation, error)
PUT/v2/prism/{teamId}/{automationObjectType}/triggered_automations/{automationId}
Delete a triggered automation and its filter trees
client.TriggeredAutomations.Delete(ctx, automationObjectType, automationID, body) error
DELETE/v2/prism/{teamId}/{automationObjectType}/triggered_automations/{automationId}
ModelsExpand Collapse
type TriggeredAutomation struct{…}

A triggered automation. kind selects the shape: update fires on object updates and requires a changeset (from/to transition) filter plus an optional state precondition; lifecycle fires on create and/or delete (on_create/on_delete) and requires a state filter (no changeset). state permits dot-paths (nested reference filters); changeset is direct properties only. Object type is taken from the path.

Kind TriggeredAutomationKind
One of the following:
const TriggeredAutomationKindUpdate TriggeredAutomationKind = "update"
const TriggeredAutomationKindLifecycle TriggeredAutomationKind = "lifecycle"
Name string
ID stringOptional
formatuuid
Actions []TriggeredAutomationActionOptional

Actions to run when the automation fires; each item has a type plus type-specific fields.

Type TriggeredAutomationActionsType
One of the following:
const TriggeredAutomationActionsTypeAgent TriggeredAutomationActionsType = "agent"
const TriggeredAutomationActionsTypeWebhook TriggeredAutomationActionsType = "webhook"
const TriggeredAutomationActionsTypeWait TriggeredAutomationActionsType = "wait"
const TriggeredAutomationActionsTypeEmail TriggeredAutomationActionsType = "email"
const TriggeredAutomationActionsTypeLinkedin TriggeredAutomationActionsType = "linkedin"
AgentID stringOptional

Required when type is agent. The agent to run.

formatuuid
CronExpression stringOptional

wait: cron schedule for the resume time. Exactly one of delay_seconds or cron_expression.

DelaySeconds int64Optional

wait: relative delay in seconds. Exactly one of delay_seconds or cron_expression.

RecipientEmailPropDefID stringOptional

Required when type is email. The property (on the recipient view object) holding the recipient email address.

formatuuid
RecipientProviderPropDefID stringOptional

Required when type is linkedin. The property (on the recipient view object) holding the recipient LinkedIn provider id.

formatuuid
RecipientViewID stringOptional

Required when type is email or linkedin. The saved prism view resolved at send time to the recipient audience (its filter re-runs each step, so responders drop out of later drip sends).

formatuuid
RecipientViewObjectType stringOptional

Required when type is email or linkedin. Must be contact — the recipient audience is a contact view (contacts carry the direct email / linkedin provider property).

SendAsUserID stringOptional

Required when type is email or linkedin. The user (external id) the message is sent as.

Subject stringOptional

Required when type is email. The subject line; rendered as a Liquid template per recipient.

TemplateID stringOptional

Required when type is email or linkedin. The email-template document whose body is rendered (Liquid) per recipient.

formatuuid
Timezone stringOptional

wait: IANA timezone for evaluating cron_expression (optional).

WebhookID stringOptional

Required when type is webhook. The id of the webhook the event is dispatched to (async) when the automation fires.

formatuuid
Changeset TriggeredAutomationChangesetOptional

A changeset filter group (update automations only): a combinator plus an array of transition clauses matching what is changing. Dot-paths (nested reference filters) are NOT permitted — direct properties only.

Combinator TriggeredAutomationChangesetCombinatorOptional
One of the following:
const TriggeredAutomationChangesetCombinatorAnd TriggeredAutomationChangesetCombinator = "AND"
const TriggeredAutomationChangesetCombinatorOr TriggeredAutomationChangesetCombinator = "OR"
Filter []map[string, unknown]Optional

Each entry is a transition clause { slug: { from?: { comparator: value }, to?: { comparator: value } } }. from matches the prior value, to the new value; an empty body { slug: {} } matches any change to that property.

CreatedAt stringOptional
Enabled boolOptional
ListID stringOptional
formatuuid
OnCreate boolOptional

Lifecycle automations only.

OnDelete boolOptional

Lifecycle automations only.

State TriggeredAutomationStateOptional

A filter group: a combinator plus an array of slug-based clauses. Dot-paths (e.g. organization.location) express nested reference filters.

Combinator TriggeredAutomationStateCombinatorOptional
One of the following:
const TriggeredAutomationStateCombinatorAnd TriggeredAutomationStateCombinator = "AND"
const TriggeredAutomationStateCombinatorOr TriggeredAutomationStateCombinator = "OR"
Filter []map[string, unknown]Optional

Each entry is { slug: { comparator: value } }

TeamID stringOptional
formatuuid
UpdatedAt stringOptional
UserID stringOptional