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:

  1. Receives data via webhook trigger
  2. Uses CONNECTOR step to send personalized email
  3. Uses CONDITION step to route enterprise signups to sales

Step 1: Set Up Email Connection

Before building the automation, create an email connection:

  1. Go to Connections
  2. Click + New Connection
  3. Choose your email connector:
    • SendGrid — Popular transactional email
    • AWS SES — Amazon Simple Email Service
    • SMTP — Generic SMTP server

Example: SendGrid Connection

Field Value
API Key Your SendGrid API key
From Email noreply@work.studio

Step 2: Create the Automation

  1. Go to Automations
  2. Click + New Automation
  3. Name: Welcome Email Sender
  4. Click Create

Step 3: Add Webhook Trigger

Configure Webhook

  1. Click Add Trigger
  2. Select Webhook
  3. You'll see a unique URL like:

    api.work.studio/webhook/abc123xyz
  4. 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

  1. Click + below the trigger
  2. Select CONNECTOR from the step palette

Configure Email Connector

Field Value
Connector SendGrid (or your email connector)
Connection Your email connection
Operation sendEmail (or similar)

Configure Email Parameters

Parameter Value
to {{ input.email }}
subject Welcome to work.studio, {{ input.name }}!
html See template below

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

  1. Click + after the CONNECTOR step
  2. Select CONDITION from the step palette
  3. Name: Check Enterprise

Configure Condition

{{ input.plan }} == "enterprise"

True Branch: Sales Notification

Add another CONNECTOR step in the True branch:

Parameter Value
to sales@work.studio
subject New Enterprise Signup: {{ input.name }}
html <p>A new enterprise customer signed up!</p><p>Name: {{ input.name }}<br>Email: {{ input.email }}</p>

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

  1. Click Save
  2. Click Test
  3. Enter sample data:
{
  "name": "John Doe",
  "email": "john@example.com",
  "plan": "pro"
}
  1. 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:

  1. Welcome email to jane@bigcorp.com
  2. 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:

Field Value
Name emailBody
Value Your HTML template with expressions

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


Next Steps