For the complete documentation index, see llms-docs.txt or the site index llms.txt. Full docs corpus: llms-full-docs.txt. Prefer the markdown version of this page at /docs/setup/backend/workflow.md. Product capabilities: skill.md. Docs MCP: /docs/mcp. Site MCP: /mcp.
Workflow
Set up, configure, and run the Reloop workflow microservice locally.
Marketing automation: drip campaigns, delays, and multi-step journeys via BullMQ.
Overview
| Property | Value |
|---|---|
| Directory | apps/backend/workflow |
| Port | 8017 |
| Local URL | https://local.reloop.sh/api/workflow |
| Swagger UI | https://local.reloop.sh/api/workflow/openapi |
| Workbench | https://local.reloop.sh/api/workflow/jobs |
| Stack | ElysiaJS · PostgreSQL · Redis · NATS · BullMQ |
Quick start
bun be:workflow:dev
Or bun backend:dev / bun dev.
Environment
apps/backend/workflow/.env (from bun setup / bun env:setup).
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
WEBHOOK_ENCRYPTION_KEY=your-64-char-hex-key
# Optional basic-auth for Workbench (/api/workflow/jobs)
# WORKBENCH_USER=admin
# WORKBENCH_PASS=secret
| Variable | Required | Default |
|---|---|---|
PG_URL | YES | postgresql://... |
REDIS_URL | YES | redis://... |
PORT | YES | 8017 |
BASE_URL | YES | https://local.reloop.sh |
NATS_URL | YES | nats://localhost:4222 |
WEBHOOK_ENCRYPTION_KEY | Same value as the webhook service | Dev key in .env.dev |
WORKBENCH_USER | Outside development | empty (dashboard disabled) |
WORKBENCH_PASS | Outside development | empty (dashboard disabled) |
Outside development the dashboard at /api/workflow/jobs only mounts when both values are set, and then sits behind HTTP basic auth. The self-host installer generates them.
This service signs outbound webhook deliveries, so it decrypts the secrets the webhook service stored. Both services must use the same WEBHOOK_ENCRYPTION_KEY, or every signature will be computed from the ciphertext and fail verification.
With NODE_ENV=development, deliveries may target http:// URLs and private or loopback addresses, so a receiver on localhost works. In production only public HTTPS endpoints are allowed.
Commands
| Command | Description |
|---|---|
bun be:workflow:dev | Start dev server with hot reloading |
bun run --filter=be-workflow build | Compile production bundle |
bun run --filter=be-workflow start | Run compiled production build |
bun run --filter=be-workflow check-types | TypeScript type-check |
Architecture
| Layer | Detail |
|---|---|
| Triggers | NATS events (e.g. contacts.created) start automation journeys |
| Execution | BullMQ workflow-queue handles delayed steps and transitions |
| Integrations | Reads contacts/templates and triggers sends via mail |
| Monitoring | Workbench UI at /api/workflow/jobs |
Next
Was this page helpful?