Skip to content

Rule.io SDK


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?

optional description?: 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?

optional sendoutType?: AutomationSendoutType

Defined in: client/src/resources/automations/automations.types.ts:124

Sendout type.

'marketing' = standard marketing email (default). 'transactional' = triggered transactional email.


trigger?

optional trigger?: 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.