Triggered Email Sequences (Welcome, Abandoned Cart, Reactivation)

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1215
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    823
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Developing Triggered Email Sequences (Welcome, Abandoned Cart)

Triggered sequences are chains of emails that start automatically in response to user action. Welcome series, abandoned cart, re-engagement, onboarding tips. Each email is sent at the right moment, not on schedule.

Architecture

Typical scheme: application publishes events → worker processes and queues tasks with delay → tasks execute email sends.

User action → App Event → Queue (BullMQ) → Email Worker → ESP (Resend/SendGrid)
                   ↓
             Sequence Engine
         (tracks progress,
          checks conditions)

Implementation with BullMQ

npm install bullmq ioredis
import { Queue, Worker, Job } from 'bullmq';
import Redis from 'ioredis';

const connection = new Redis(process.env.REDIS_URL);
const emailQueue = new Queue('email-sequences', { connection });

// Start welcome sequence
async function startWelcomeSequence(userId: string, email: string, name: string) {
  const baseData = { userId, email, name };

  // Email 1: immediately after registration
  await emailQueue.add('welcome-step-1', baseData, {
    delay: 0,
    jobId: `welcome-1-${userId}`,  // deduplication
  });

  // Email 2: after 1 day — how to use product
  await emailQueue.add('welcome-step-2', baseData, {
    delay: 24 * 60 * 60 * 1000,
    jobId: `welcome-2-${userId}`,
  });

  // Email 3: after 3 days — use case examples
  await emailQueue.add('welcome-step-3', baseData, {
    delay: 3 * 24 * 60 * 60 * 1000,
    jobId: `welcome-3-${userId}`,
  });

  // Email 4: after 7 days — if not activated — reminder
  await emailQueue.add('welcome-step-4', baseData, {
    delay: 7 * 24 * 60 * 60 * 1000,
    jobId: `welcome-4-${userId}`,
  });
}

Worker with Conditions

const worker = new Worker(
  'email-sequences',
  async (job: Job) => {
    const { userId, email, name } = job.data;

    // Check user hasn't unsubscribed
    const user = await db.users.findById(userId);
    if (!user || user.unsubscribed) return;

    switch (job.name) {
      case 'welcome-step-1':
        await sendEmail({
          to: email,
          templateId: 'welcome-01-greeting',
          data: { name },
        });
        break;

      case 'welcome-step-2':
        await sendEmail({
          to: email,
          templateId: 'welcome-02-getting-started',
          data: { name, dashboardUrl: `https://app.example.com/dashboard` },
        });
        break;

      case 'welcome-step-4':
        // Send only if user hasn't created any projects
        const projectCount = await db.projects.countByUser(userId);
        if (projectCount > 0) return;  // skip — already active

        await sendEmail({
          to: email,
          templateId: 'welcome-04-reminder',
          data: { name },
        });
        break;

Timeline

Implementing welcome and abandoned cart sequences — 2–3 days.