Appearance
Rule.io SDK / client/src / CreateEmailAutomationPayload
Interface: CreateEmailAutomationPayload
Defined in: client/src/resources/automations/automations.types.ts:109
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:113
Optional description.
name
name:
string
Defined in: client/src/resources/automations/automations.types.ts:111
Automation name. Required.
sendoutType?
optionalsendoutType?:AutomationSendoutType
Defined in: client/src/resources/automations/automations.types.ts:127
Sendout type.
'marketing' = standard marketing email (default). 'transactional' = triggered transactional email.
trigger?
optionaltrigger?:AutomationTrigger
Defined in: client/src/resources/automations/automations.types.ts:120
Trigger that activates this automation.
Can be added later via AutomationsClient.updateAutomation. type must be uppercase.