Course/Chapter 7/2. Automated Email Campaign
    intermediate
    Chapter 7: Real-World Automation Projects

    2. Automated Email Campaign

    Create event-driven email sequences.

    20m Lesson 2 of 5

    Build an automated email campaign that sends personalized emails based on user behavior and preferences.

    Features

    • - Trigger: New user signup or specific action
    • - Personalized templates with dynamic content
    • - Delay nodes for drip sequence timing
    • - Unsubscribe handling
    • - Open/click tracking via SendGrid

    Drip Sequence Architecture

    1. Day 0: Welcome email with getting-started guide
    2. Day 2: Feature highlight email
    3. Day 5: Case study / social proof
    4. Day 7: Check-in — "Need help?"
    5. Day 14: Upgrade offer (if on free plan)

    Code Examples

    Email Template with Dynamic Content
    javascript
    const user = $input.first().json;
    
    const emailBody = `
    Hi ${user.first_name},
    
    Welcome to our platform! 🎉
    
    Here's what you can do next:
    
    1. Complete your profile: ${user.profile_url}
    2. Browse templates: ${user.templates_url}
    3. Join our community: https://community.example.com
    
    Your account details:
    - Plan: ${user.plan || "Free"}
    - Email: ${user.email}
    
    Best,
    The Team
    `.trim();
    
    return [{
      json: {
        to: user.email,
        subject: `Welcome, ${user.first_name}! Let's get started`,
        body: emailBody,
        send_at: user.plan === "pro" ? "now" : "next_morning"
      }
    }];

    Pro Tips

    • 💡Use the Wait node between emails in a drip sequence — e.g., wait 2 days between welcome and onboarding emails
    • 💡Always include an unsubscribe link — it's required by law (CAN-SPAM, GDPR)
    • 💡Personalize subject lines with the recipient's name for 20-30% higher open rates

    Comprehension Quiz

    Answer 2 of 2 correctly to unlock lesson completion.

    1. What node creates delays between emails in a drip sequence?

    2. What must every marketing email include by law?

    Pass the quiz above to unlock lesson completion