import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.automations.update(
'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
{ status: 'enabled' },
);
{
"object": "automation",
"id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}
Update an existing automation.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.automations.update(
'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
{ status: 'enabled' },
);
{
"object": "automation",
"id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}
npm install resend@6.11.0-canary.1
name, status, or both steps and connections.
When updating the workflow graph, steps and connections must be sent
together.enabled or disabled.connections. See Step
Properties for full object
definition.steps. See Connection
Properties for full
object definition.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.automations.update(
'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
{ status: 'enabled' },
);
{
"object": "automation",
"id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}
Was this page helpful?