Workflow Editor
The Newsletter Workflow Editor allows you to create automated, multi-step sequences that trigger based on subscriber actions or time-based events. Build sophisticated nurture campaigns, welcome sequences, and lifecycle automations with conditional logic and external integrations.
Getting Started with Triggers
Every workflow begins with a trigger - the event that starts the automated sequence. The trigger defines when and for whom the workflow will run.
Available Trigger Types
Manual Trigger
Start workflows manually or via API calls. Perfect for one-off campaigns or testing.
Date-Based Triggers
Trigger workflows on specific dates relative to subscriber data. Great for anniversaries, renewals, or follow-ups.
Unsubscribe Events
Automatically trigger when subscribers opt out of your newsletters.
Subscribe Events
Trigger workflows when new subscribers join (with email verification).
API Triggers
Start workflows programmatically via API calls for maximum flexibility.
Manual Triggers
Manual workflows require no additional configuration - they can be started on-demand for specific subscribers or groups.
Date-Based Triggers
Date triggers allow you to schedule workflows based on subscriber data fields. Configure them by selecting:
- Target Audience: Choose specific groups or segments to include
- Date Field: Select which date field to monitor (basic fields like "Added At" or custom date/datetime fields)
- Timing: Set when to trigger relative to the date (before, on, or after)
- Time of Day: For date fields, specify the UTC time to execute
Select Recipients
Choose whether to target specific groups or segments of subscribers
Choose Date Field
Pick the date field that will determine when the workflow runs
Set Timing
Specify if the workflow should run before, on, or after the target date
Configure Duration (if needed)
Set how many days/weeks/months before or after the trigger date
Set Execution Time (for date fields)
Specify the UTC time when date-based triggers should execute
Event-Based Triggers
- Unsubscribe: Triggers immediately when a subscriber unsubscribes
- Subscribe: Triggers when a subscriber successfully verifies their email after signing up
API Triggers
API triggers allow external systems to start workflows programmatically. When configured, you'll receive a code example showing how to trigger the workflow.
await fetch("https://yaplet.com/api/newsletter/workflow/start", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Y-API-Key": "your_api_key",
},
body: JSON.stringify({
email: "[email protected]",
workflow_id: "your-workflow-id",
key1: "value1",
key2: "value2",
}),
});
curl -X POST "https://yaplet.com/api/newsletter/workflow/start" \
-H "Content-Type: application/json" \
-H "Y-API-Key: your_api_key" \
-d '{
"email": "[email protected]",
"workflow_id": "your-workflow-id",
"key1": "value1",
"key2": "value2"
}'
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://yaplet.com/api/newsletter/workflow/start");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Y-API-Key: your_api_key"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"email" => "[email protected]",
"workflow_id" => "your-workflow-id",
"key1" => "value1",
"key2" => "value2"
]));
$response = curl_exec($ch);
curl_close($ch);
import requests
response = requests.post(
"https://yaplet.com/api/newsletter/workflow/start",
headers={
"Content-Type": "application/json",
"Y-API-Key": "your_api_key"
},
json={
"email": "[email protected]",
"workflow_id": "your-workflow-id",
"key1": "value1",
"key2": "value2"
}
)
Custom data fields are sent as top-level fields alongside email and workflow_id. They become available in subsequent EMAIL and WEBHOOK nodes using {{key1}}, {{key2}} placeholders.
For complete API documentation including error codes, field reference, and integration best practices, see the Workflow API documentation.
Building Your Workflow
After setting up your trigger, build your workflow by adding nodes. Each node represents a step in your automation sequence.
Email Nodes
Email nodes are the core of your workflow - they send messages to subscribers at specific points in your sequence.
Setting Up Email Content
Configure Basic Details
Set the email subject line, preheader text, sender name, and verified sender email address
Create or Select Design
Choose how to create your email content:
- Start from scratch: Create a new email design
- Use a template: Select from pre-built templates
- Copy from recent email: Reuse content from previous campaigns
Design Your Email
Use the drag-and-drop email builder to create visually appealing content
Test Your Email
Send test emails to verify content and formatting
Available Email Creation Options
From Scratch: Begin with a blank canvas and build your email design using the visual editor.
From Template: Choose from professionally designed templates optimized for engagement and conversion.
From Recent Email: Reuse successful email content from your previous campaigns to maintain consistency.
Email Editor Features
The email editor provides a full-featured design interface for creating compelling content. For detailed information about the email builder capabilities, see Email Design and Templates.
Delay Nodes
Delay nodes add waiting periods between workflow steps, allowing you to space out your communications strategically.
Configuration Options:
- Wait time: 1-60 minutes, 1-24 hours, 1-31 days, 1-52 weeks, or 1-12 months
- The delay must be realistic (e.g., max 60 minutes, 24 hours, etc.)
Use Cases:
- Give subscribers time to engage before sending follow-ups
- Space out educational content in nurture sequences
- Respect deliverability best practices with appropriate timing
Condition Nodes
Condition nodes create branching logic in your workflows, directing subscribers down different paths based on their data and characteristics.
Available Condition Types
Field Conditions
Check subscriber field values like email, name, custom fields, and subscription status.
Group Membership
Evaluate if subscribers belong to specific contact groups.
Segment Membership
Check against saved subscriber segments with their predefined filters.
Building Conditions
Use the query builder to create logical expressions that determine workflow paths:
Select Condition Type
Choose from Fields, Group Membership, or Segment Membership
Choose Criteria
Pick the specific field, group, or segment to evaluate
Set Comparison
Select how to compare the subscriber data (equals, contains, greater than, etc.)
Enter Values
Input comparison values or select from available options
Combine Logic
Use AND/OR operators to create complex conditions
Field Operators
Different field types support different comparisons:
Email, name, custom text fields:
- Equals/Not equals - Exact match
- Contains/Does not contain - Partial text match
- Starts/ends with - Text position matching
- Is set/Not set - Check for value existence
:::
Created date, custom date fields:
- Before/After - Date range comparisons
- More/Less than - Relative time periods
- Is set/Not set - Check for date existence
:::
Custom number fields:
- Equals/Not equals - Exact number match
- Greater/Less than - Numeric comparisons
- Is set/Not set - Check for value existence ::: ::
Action Nodes
Action nodes modify subscriber data or group memberships when reached in the workflow.
Available Actions
Update Custom Fields: Modify subscriber information
- Set text field values
- Increment/decrement number fields
- Set date fields to specific values or relative dates
Group Management:
- Copy to groups: Add subscribers to additional groups
- Move to groups: Transfer subscribers between groups
- Remove from groups: Remove subscribers from specified groups
Subscription Management:
- Mark as unsubscribed: Immediately unsubscribe the subscriber
Webhook Nodes
Webhook nodes send data to external services when reached in the workflow, enabling integrations with CRMs, analytics platforms, and custom applications.
Configuration
Set Webhook URL
Enter the destination endpoint
Add Secret Key
Generate or enter a secret key for request authentication
Configure Request Body
Add key-value pairs to send in the webhook payload
Use Dynamic Values
Include subscriber data using {{field_name}} syntax
Test the Webhook
Send a test request to verify your configuration
Authentication
Webhooks include a Signature header containing an HMAC SHA-256 hash of your secret key. Verify requests on your server by hashing the same key and comparing signatures.
Available Field Tags
Use these placeholders in webhook URLs and body values:
Basic Fields:
{{email}}- Subscriber email address{{name}}- Subscriber name{{created_at}}- When subscriber was added{{state}}- Subscriber status
Custom Fields: {{your_custom_field_tag}} for any custom fields you've created
Dynamic Data: Any custom data sent via API triggers or fetched via Data Fetch nodes
Data Fetch Nodes
Data Fetch nodes retrieve information from external APIs to use in subsequent email and webhook nodes.
Configuration
Set API Endpoint
Enter the GET request URL (supports field interpolation)
Add Authentication
Generate or enter a secret key for API authentication
Test the Request
Send a test request to validate the API response
Use Retrieved Data
Access response values in later nodes using {{key_name}}
Response Format Requirements
API responses must be JSON objects with:
- String keys only
- String or number values
- Maximum 20 fields per response
Example response format:
{
"user_id": "12345",
"account_type": "premium",
"last_login": "2024-01-15"
}
Authentication
Like webhooks, fetch requests include a Signature header with HMAC SHA-256 authentication.
Workflow Switch Nodes
Workflow Switch nodes transfer subscribers to different workflows, allowing you to create modular automation sequences.
Use Cases
- Common Entry Sequences: Start with a universal welcome flow, then branch to specialized nurture tracks
- Re-engagement Campaigns: Route inactive subscribers to different recovery workflows
- Segmentation Logic: Send different subscriber types through optimized sequences
Auto Layout
As workflows grow with multiple branches and conditions, nodes can overlap or become hard to follow. The Auto Layout button instantly reorganizes the entire workflow tree into a clean, balanced structure.
Click the Auto Layout button in the top-right toolbar to reorganize all nodes. The editor automatically zooms and pans to fit the entire workflow in view.
The layout engine:
- Centers the trigger at the top and arranges all child nodes below it
- Balances branches — condition nodes (yes/no paths) get equal horizontal space
- Spaces evenly — consistent vertical and horizontal gaps between all nodes
- Handles nesting — deeply branched workflows are laid out without overlaps
Generate with AI
You can generate an entire workflow structure from a plain-text description using AI. Instead of manually adding and connecting nodes one by one, describe what you want the workflow to do and AI builds the full node structure for you.
How to Use It
Open the generate modal
Click the sparkle icon button in the top-right toolbar to open the AI generation modal.
Choose a trigger type (optional)
Select a trigger type from the dropdown to guide the AI, or leave it on Auto-detect and let the AI choose based on your description. Available trigger types:
- Auto-detect — AI picks the best trigger for your use case
- Manual — Start workflows on demand
- On Subscribe — Trigger when someone joins
- On Unsubscribe — Trigger when someone leaves
- Date-based — Trigger relative to a date field
- API — Trigger from an external system
Describe your workflow
Write a plain-English description of what you want the automation to do. Be as specific as you like — mention timing, conditions, email topics, and actions.
Example descriptions:
- "When someone subscribes, wait 1 day, send a welcome email, wait 3 days, send a tips email"
- "After subscribing, send a welcome email. Wait 5 days, check if they opened it. If yes, send a thank-you. If no, send a reminder with a different subject line."
- "Unsubscribe trigger: send a feedback survey email immediately, wait 7 days, if they haven't re-subscribed, remove them from the Active Users group"
Review and confirm
If your workflow already has nodes, you'll be asked to confirm before the AI replaces them. Click Confirm to proceed.
What Gets Generated
The AI creates the complete workflow structure including:
- Trigger configuration with the appropriate settings
- Email nodes with subject lines and preheader text (you design the email content separately using the email editor)
- Delay nodes with appropriate wait times
- Condition nodes with branching logic based on your description
- Action nodes for group management, field updates, or unsubscribes
- Webhook and fetch nodes when your description involves external integrations
After Generation
Once the AI generates your workflow:
- Nodes are auto-laid out — the layout engine positions everything cleanly
- Email content is not included — email nodes have subjects and preheaders, but you need to design the actual email content using the email editor on each node
- Review the structure — check that the logic matches your intent, and adjust any nodes as needed
- Activate when ready — test your emails and activate the workflow
Workflow Management
Validation and Activation
Before activating a workflow, ensure:
- A trigger is properly configured
- At least one action node exists
- All required fields are filled
Monitoring Performance
Track workflow performance through the built-in reporting:
- Completed: Successfully finished workflows
- Queued: Workflows waiting to execute
- Failed: Workflows that encountered errors
Testing Workflows
- Send test emails from the email node configuration
- Use test webhooks and API calls to verify integrations
- Manually trigger workflows with test subscribers