Skip to main content
POST
/
automations
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.automations.create({
  name: 'Welcome series',
  status: 'disabled',
  steps: [
    {
      key: 'start',
      type: 'trigger',
      config: { eventName: 'user.created' },
    },
    {
      key: 'welcome',
      type: 'send_email',
      config: {
        template: { id: '34a080c9-b17d-4187-ad80-5af20266e535' },
      },
    },
  ],
  connections: [{ from: 'start', to: 'welcome' }],
});
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}

Documentation Index

Fetch the complete documentation index at: https://resend.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Body Parameters

name
string
required
The name of the automation.
status
string
The status of the automation. Possible values are enabled or disabled. Defaults to disabled.
steps
Step[]
The steps that compose the automation graph. Must be provided together with connections. See Step Properties for full object definition.
connections
Connection[]
The connections between steps in the automation graph. Must be provided together with steps. See Connection Properties for full object definition.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.automations.create({
  name: 'Welcome series',
  status: 'disabled',
  steps: [
    {
      key: 'start',
      type: 'trigger',
      config: { eventName: 'user.created' },
    },
    {
      key: 'welcome',
      type: 'send_email',
      config: {
        template: { id: '34a080c9-b17d-4187-ad80-5af20266e535' },
      },
    },
  ],
  connections: [{ from: 'start', to: 'welcome' }],
});
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}