Appearance
Rule.io SDK / client/src / CreateEmailAutomationPayload
Interface: CreateEmailAutomationPayload
Defined in: client/src/resources/automations/automations.types.ts:106
Payload for AutomationsClient.createEmailAutomation.
At minimum, provide a name. You can set the trigger at creation time or add it later with AutomationsClient.updateAutomation.
Example
typescript
const automation = await client.automations.createEmailAutomation({
name: 'Welcome email',
trigger: { type: 'TAG', id: tagId },
sendoutType: 'marketing',
});Properties
description?
optionaldescription?:string
Defined in: client/src/resources/automations/automations.types.ts:110
Optional description.
name
name:
string
Defined in: client/src/resources/automations/automations.types.ts:108
Automation name. Required.
sendoutType?
optionalsendoutType?:AutomationSendoutType
Defined in: client/src/resources/automations/automations.types.ts:124
Sendout type.
'marketing' = standard marketing email (default). 'transactional' = triggered transactional email.
trigger?
optionaltrigger?:AutomationTrigger
Defined in: client/src/resources/automations/automations.types.ts:117
Trigger that activates this automation.
Can be added later via AutomationsClient.updateAutomation. type must be uppercase.