Appearance
Rule.io SDK / client/src / CreateEmailAutomationPayload
Interface: CreateEmailAutomationPayload
Defined in: client/src/resources/automations/automations.types.ts:151
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:155
Optional description.
name
name:
string
Defined in: client/src/resources/automations/automations.types.ts:153
Automation name. Required.
sendoutType?
optionalsendoutType?:AutomationSendoutType
Defined in: client/src/resources/automations/automations.types.ts:169
Sendout type.
'marketing' = standard marketing email (default). 'transactional' = triggered transactional email.
tagActionsOnFinish?
optionaltagActionsOnFinish?:AutomationFinishTagEntry[]
Defined in: client/src/resources/automations/automations.types.ts:177
Tags to attach to or remove from subscribers once the automation completes for them. Omit to create the automation with no finish tags.
Each tagId can appear at most once — the API rejects a request that both adds and removes the same tag.
trigger?
optionaltrigger?:AutomationTrigger
Defined in: client/src/resources/automations/automations.types.ts:162
Trigger that activates this automation.
Can be added later via AutomationsClient.updateAutomation. type must be uppercase.