We've launched automation workflows in MailDiver. Send triggered emails based on user behavior - when someone signs up, abandons a cart, or completes any action in your app.
This has been one of the most requested features. You can now create welcome sequences, onboarding flows, and behavioral email campaigns that run automatically based on events from your application.
How It Works
Automation workflows are event-driven. When a user performs an action in your application, you send an event to MailDiver. If a workflow is configured for that event, it starts executing automatically.
Here's the flow:
- User performs an action in your app (signup, purchase, etc.)
- Your backend sends an event to MailDiver's API
- Active workflows listening for that event trigger
- Each workflow creates a separate execution for that user
- The workflow runs through its steps: sending emails, waiting, checking conditions
- You can track execution status in the dashboard or via API
Dashboard vs API
You only need the API to send events from your application. Everything else happens in the MailDiver dashboard:
Dashboard (no API needed):
- Create and design workflows with the visual builder
- List all your workflows
- Monitor executions (see status, current step, wait times)
- View all emails sent via workflows
- Track which contacts are in which executions
- See execution history and performance
API (required):
- Send events from your application to trigger workflows
- Update contact properties programmatically (optional)
- Query execution data programmatically (optional)
The rest of this post shows API examples for developers who want programmatic access. If you just want to create workflows and monitor them visually, use the dashboard.
Sending Events
Trigger workflows by sending events from your application:
curl -X POST https://api.maildiver.com/v1/events \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_name": "user_signed_up",
"email": "user@example.com",
"properties": {
"first_name": "John",
"plan": "free",
"signup_source": "landing_page"
}
}'
Properties you send get merged with existing contact data using deep merge. This means you only send what changed - no need to resend all properties every time.
Deep merge with null deletion:
- Omitted fields: Preserved unchanged
- Fields with values: Updated or added
- Fields set to null: Deleted from contact
- Nested objects: Recursively merged
- Arrays: Replaced entirely
Example:
// First event
{ first_name: "John", plan: "free" }
// Later event
{ plan: "pro" }
// Result
{ first_name: "John", plan: "pro" }
Conditional Logic
Workflows support yes/no branching with 10 rule operators:
Comparison: equals, not_equals, greater_than, less_than Text matching: contains, not_contains, begins_with, ends_with Existence: exists, not_exists
Combine multiple rules with AND/OR logic. Create paths like "if plan = pro, send email A, otherwise send email B".
Rules check against contact properties at execution time, so they reflect the current state of the contact - not frozen from when the workflow started.
Wait Steps
Add delays between emails. Executions pause during wait periods and the system schedules automatic resumption - no polling or manual intervention needed.
For example, you can send a welcome email, wait 2 days, then send a tips email. All configured in the dashboard's visual workflow builder.
Updating Contact Properties
Update contact properties without triggering workflows:
curl -X PATCH https://api.maildiver.com/v1/automation/contacts/user@example.com \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"properties": {
"plan": "pro",
"last_login": "2025-10-18T12:00:00Z"
}
}'
Use this endpoint when you want to update contact data but don't want to trigger workflows. The event endpoint both updates contacts AND triggers workflows.
Tracking Executions
Query workflow executions via API:
# Get all executions for a contact
curl https://api.maildiver.com/v1/automation/executions?email=user@example.com \
-H "Authorization: Bearer YOUR_API_KEY"
# Get executions for a specific workflow
curl https://api.maildiver.com/v1/automation/executions?workflow_id=wf_123 \
-H "Authorization: Bearer YOUR_API_KEY"
Execution status:
IN_PROGRESS
: Currently executingWAITING
: Paused on a wait stepCOMPLETED
: Finished successfullyFAILED
: Encountered an errorCANCELLED
: Stopped (usually from unsubscribe)
Unsubscribe Handling
Include {{ unsubscribe_url }}
in your email templates. When a user clicks it, MailDiver immediately:
- Cancels ALL active executions (IN_PROGRESS and WAITING) for that workflow
- Prevents future events from triggering that workflow for this contact
- Sets
cancellation_reason
to "User unsubscribed from workflow"
Unsubscribe is workflow-specific. A user can unsubscribe from your welcome sequence but still receive transactional emails or emails from other workflows.
Building Workflows
Workflows are created in the dashboard using the visual builder - not via API. This prevents accidental workflow creation from code and ensures proper testing.
Once created, workflows run automatically based on events you send. You don't need to know anything about workflow internals - just send events and monitor executions.
The visual builder lets you:
- Configure trigger events
- Add email steps using existing templates
- Set wait times between steps
- Create conditional branches with rules
- Test workflows before activating
Use Cases
Welcome sequences: Send a series of emails when users sign up Onboarding flows: Guide new users through your product Abandoned cart: Remind users about incomplete purchases Re-engagement: Bring back inactive users Post-purchase: Follow up after purchases Behavioral triggers: React to any user action
Getting Started
- Create a workflow in the automation dashboard
- Configure the trigger event and add email steps
- Activate the workflow
- Send events from your application
Check the automation workflows guide for detailed setup instructions and the API reference for all available endpoints.
We built automation workflows to handle the email sequences every application needs: welcoming new users, nurturing leads, and responding to user behavior. No complex integrations, no external tools - just send events and let the workflows run.
Start with a simple welcome sequence. Send a "user_signed_up" event when someone creates an account, and MailDiver handles the rest.
Get Started with MailDiver
Automation workflows are completely free - we only charge for emails sent. Your first 5,000 emails per month are free, and there are no hidden fees for automation features, domains, or team members.
Unlike other platforms that charge extra for automation, MailDiver includes all automation features at no additional cost. You pay for the emails you send, not the features you use.
Ready to automate your email sequences? Sign up for free and start building workflows today.