Workflow

Set up, configure, and run the Reloop workflow microservice locally.

Complete Base Setup First

Ensure you've finished the Setup — before proceeding.

Service Overview

Marketing automation — drip campaigns, delays, and multi-step journeys via BullMQ.

PropertyValue
Directoryapps/backend/workflow
Port8017
Local URLhttps://local.reloop.sh/api/workflow
Swagger UIhttps://local.reloop.sh/api/workflow/openapi
Bull Boardhttps://local.reloop.sh/api/workflow/bull-board
StackElysiaJS PostgreSQL Redis NATS BullMQ

Quick Start

Run from the monorepo root:

bun be:workflow:dev

The service starts with hot reloading on port 8017.

Environment Configuration

Variables live in apps/backend/workflow/.env. Running bun env:setup from the root auto-populates this file.

PG_URL=postgresql://reloop:reloop123@localhost:5432/reloop
REDIS_URL=redis://:reloop123@localhost:6379
PORT=8017
BASE_URL="https://local.reloop.sh"
NATS_URL=nats://localhost:4222
NODE_ENV=development

Reference Table

VariableRequiredDefault
PG_URLYESpostgresql://...
REDIS_URLYESredis://...
PORTYES8017
BASE_URLYEShttps://local.reloop.sh
NATS_URLYESnats://localhost:4222

Development Commands

CommandDescription
bun be:workflow:devStart dev server with hot reloading
bun run --filter=workflow buildCompile production bundle
bun run --filter=workflow startRun compiled production build
bun run --filter=workflow check-typesTypeScript type-check

Architecture

LayerDetail
TriggersNATS events (e.g. contacts.created) start automation journeys.
ExecutionBullMQ workflow-queue handles delayed steps and transitions.
IntegrationsReads contacts/templates and triggers sends via mail.
MonitoringBull Board UI at /api/workflow/bull-board.

Was this page helpful?

Edit this page