Automations
Contact Delete
Remove the contact that triggered the automation from its audience.
The contact delete step removes the contact that triggered the automation from its audience. Once deleted, the contact no longer receives emails from that audience and any remaining steps in the run are skipped. See Using automations for the surrounding workflow.
Common use cases:
- Compliance — delete contacts as part of a data-removal workflow.
- Churn — remove a contact when a user stops using your service.
- Unsubscribe flows — automatically remove contacts who opt out.
How it works
In the dashboard, add the Delete contact step — no configuration is required; it is ready as soon as you add it. Over the API, add a contact_delete step with an empty config object.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.create({
"name": "Remove churned users",
"domain": "yourdomain.com",
"steps": [
{
"key": "start",
"type": "trigger",
"config": { "event_name": "user.deleted" }
},
{
"key": "remove",
"type": "contact_delete",
"config": {}
}
],
"connections": [
{ "from": "start", "to": "remove", "type": "default" }
]
});
console.log({ data, error });Deleting a contact is permanent. The contact and all of its properties are removed from the audience. If the contact needs to be re-added later, it must be created again.
Configuration
The config object is empty — no additional fields are required.
{
"key": "remove_contact",
"type": "contact_delete",
"config": {}
}