Appearance
Rule.io SDK / client/src / SetEmailAutomationPayload
Interface: SetEmailAutomationPayload
Defined in: client/src/resources/automations/automations.types.ts:167
Payload for AutomationsClient.setEmailAutomation (full replacement).
All four fields are required — the API replaces the entire automation body. Omitted fields revert to API defaults, not the previous values.
The message type is fixed to 'email' by the method. If the automation does not yet exist it is created as an email automation.
Example
typescript
await client.automations.setEmailAutomation(automationId, {
name: 'Welcome email',
active: true,
trigger: { type: 'TAG', id: tagId },
sendoutType: 'transactional',
});Properties
active
active:
boolean
Defined in: client/src/resources/automations/automations.types.ts:175
Whether the automation is active. Required.
Pass false to create/replace as paused.
name
name:
string
Defined in: client/src/resources/automations/automations.types.ts:169
Automation name. Required.
sendoutType
sendoutType:
AutomationSendoutType
Defined in: client/src/resources/automations/automations.types.ts:188
Sendout type. Required.
'marketing' = standard marketing email. 'transactional' = triggered transactional email.
trigger
trigger:
AutomationTrigger
Defined in: client/src/resources/automations/automations.types.ts:181
Trigger configuration. Required.
type must be uppercase ('TAG' or 'SEGMENT').