Email Notifications
Send automated emails using CONNECTOR steps with email services like SendGrid, SES, or SMTP.
Time
Level
Prerequisites
15 minutes
Beginner
Email connector configured
What You'll Build
An automation that:
- Receives data via webhook trigger
- Uses CONNECTOR step to send personalized email
- Uses CONDITION step to route enterprise signups to sales
Step 1: Set Up Email Connection
Before building the automation, create an email connection:
- Go to Connections
- Click + New Connection
- Choose your email connector:
- SendGrid — Popular transactional email
- AWS SES — Amazon Simple Email Service
- SMTP — Generic SMTP server
Example: SendGrid Connection
Step 2: Create the Automation
- Go to Automations
- Click + New Automation
- Name:
Welcome Email Sender - Click Create
Step 3: Add Webhook Trigger
Configure Webhook
- Click Add Trigger
- Select Webhook
You'll see a unique URL like:
api.work.studio/webhook/abc123xyz- Copy this URL — you'll need it to test
Expected Payload
{
"name": "John Doe",
"email": "john@example.com",
"plan": "pro"
}
Step 4: Add CONNECTOR Step for Email
Add the Step
- Click + below the trigger
- Select CONNECTOR from the step palette
Configure Email Connector
Configure Email Parameters
Email Body Template
<p>Hi {{ input.name }},</p>
<p>Welcome to work.studio! We're excited to have you on the <strong>{{ input.plan }}</strong> plan.</p>
<p>Here's what you can do next:</p>
<ol>
<li>Create your first automation</li>
<li>Connect your favorite apps</li>
<li>Explore our tutorials</li>
</ol>
<p>Need help? Reply to this email or visit our docs.</p>
<p>Best,<br>
The work.studio Team</p>
Step 5: Add CONDITION Step
Let's notify sales when enterprise customers sign up.
Add CONDITION
- Click + after the CONNECTOR step
- Select CONDITION from the step palette
- Name:
Check Enterprise
Configure Condition
{{ input.plan }} == "enterprise"
True Branch: Sales Notification
Add another CONNECTOR step in the True branch:
Workflow Diagram
┌───────────────────┐
│ Webhook Trigger │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ CONNECTOR │
│ Send Welcome │
│ Email │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ CONDITION │
│ Is Enterprise? │
├─────────┬─────────┤
│ True │ False │
└────┬────┴────┬────┘
│ │
▼ ▼
┌─────────┐ (end)
│CONNECTOR│
│Notify │
│Sales │
└─────────┘
Step 6: Test Your Automation
Save and Test
- Click Save
- Click Test
- Enter sample data:
{
"name": "John Doe",
"email": "john@example.com",
"plan": "pro"
}
- Click Run Test
Verify
- Check the test results panel
- Each step should show ✅
- Check your inbox for the welcome email
Step 7: Test Enterprise Path
Run another test with enterprise plan:
{
"name": "Jane Smith",
"email": "jane@bigcorp.com",
"plan": "enterprise"
}
Verify that both emails are sent:
- Welcome email to jane@bigcorp.com
- Notification to sales@work.studio
Using VARIABLE for Email Templates
For cleaner code, use VARIABLE steps to build email content:
Add VARIABLE Step
Add before the CONNECTOR:
Reference in CONNECTOR
html: {{ variables.emailBody }}
Alternative: FUNCTION for Complex Emails
For dynamic content with logic, use a FUNCTION step:
// Build personalized email based on plan
const { name, plan } = context.config;
let features = [];
if (plan === 'enterprise') {
features = ['Unlimited automations', 'SSO', 'Dedicated support'];
} else if (plan === 'pro') {
features = ['100 automations/mo', 'Priority support'];
} else {
features = ['10 automations/mo', 'Community support'];
}
return {
subject: `Welcome to work.studio, ${name}!`,
html: `
<p>Hi ${name},</p>
<p>Your ${plan} plan includes:</p>
<ul>
${features.map(f => `<li>${f}</li>`).join('')}
</ul>
`
};
Best Practices
Do
- Personalize with the recipient's name
- Include clear next steps
- Test with real email addresses
- Use connections for credentials
- Handle bounces and failures
Avoid
- Sending to invalid email addresses
- Including sensitive data in emails
- Hardcoding credentials (use connections)
- Forgetting error handling
Next Steps
- Scheduled Reports → — Send emails on a schedule
- Slack Notifications → — Send messages to Slack